0.0.2 • Published 9 years ago
sum-variants v0.0.2
Sum Variants
Function, which included an array of random select all combinations of numbers whose sum is equal to the specified number
Install
$ npm i sum-variantsUsage
const sumVariants = require('sum-variants');
const srcArr = [.9, 6, '4', 9.1];
console.log(sumVariants(srcArr, 10));
// [[0.9, 9.1], [4, 6]]Tests
Tests require Mocha.
mocha ./testsor with npm
npm test Test coverage with Istanbul
npm run coverageLicense
Licensed under the MIT License