Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

sum-of-multiples

jekrb17MIT1.0.0

Finds the sum of all multiples of numbers in an array below a maximum number.

sum, multiples, natural, numbers, max, project, euler

readme

sum-of-multiples

build status

js-standard-style

Get the sum of multiples of each number in an array below a maximum number.

npm install sum-of-multiples -S

Usage

var sumOfMultiples = require('sum-of-multiples')

var result = sumOfMultiples([3, 5], 10)
console.log(result) // 23

API

sumOfMultiples([array of integers], maximum integer)

License

MIT