Skip to content

A NPM Package that is a minimal production dependency JS function that takes any number of arguments and returns an array of all the common denominators of any numbers supplied

License

staghouse/common-denominators

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

86 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

common-denominators

Node CI codecov npm version

A JS function that takes any number of arguments and returns an array of all the common denominators of any numbers supplied

The Challenge

Write your own commonDenominators function inside of src/index.js. Run the validate command to test and benchmark your code against the stable. If all tests pass and the benchmark improves over the stable then PR!

Install local dev dependencies

npm install

Usage

const commonDenominators = require('common-denominators');

commonDenominators(6, 12, 24, 30); // -> [1, 2, 3, 6]

Development

Minify, test and benchmark

npm run validate

Run only unit tests

// test all files once
npm run test

// test on source
npm run test:source

// watch and test on source
npm run test:watch

Run only benchmarks

npm run benchmark

Build distribution package. Overwrites the current package export. (This should be the fastest passing version)

npm run build:dist

About

A NPM Package that is a minimal production dependency JS function that takes any number of arguments and returns an array of all the common denominators of any numbers supplied

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published