Package Exports
- interval-digit-sum
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (interval-digit-sum) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
interval-digit-sum
Find all the digits within an interval whose sum equal the target value.
Install
npm install interval-digit-sumbower install interval-digit-sumUsage
const intervalDigitSum = require('interval-digit-sum');
const numbers = intervalDigitSum([0,100], 8);
console.log(numbers);
/*
['08', '17', '26', '35', '44', '53', '62', '71', '80']
*/Unique only (non-repeating numbers)
const numbers = intervalDigitSum([0,100], 8, {
unique: true
});
console.log(numbers);
/*
['08', '17', '26', '35', '53', '62', '71', '80']
*/Test
npm testLicense
MIT