Skip to content

Latest commit

 

History

History
26 lines (18 loc) · 547 Bytes

README.md

File metadata and controls

26 lines (18 loc) · 547 Bytes

multiples-of npm version

Returns all multiples of an array of numbers below a maximum number.

Install

npm install multiples-of

Usage

/*
Return an array of all the natural numbers below 10 that are multiples of 2 or 3.
*/

var multiplesOf = require('multiples-of');
console.log( multiplesOf([2, 3], 10) ) // [ 0, 2, 3, 4, 6, 8, 9 ]

API

multiplesOf([array of integers], maximum integer)

License

MIT