factors-of-n

1.0.0 • Public • Published

Factors Of n

A function to get factors of a given input n.

constraints

n > 0

Usage

npm install --save factors
let factors = require('factors');

factors(16); // [ 1, 2, 4, 8, 16 ]
factors(178990); /* [ 1, 2, 5, 7, 10, 14, 35, 70, 2557, 5114, 12785, 17899, 25570,
                      35798, 89495, 178990 ] *

Test

run npm test

Package Sidebar

Install

npm i factors-of-n

Weekly Downloads

1

Version

1.0.0

License

ISC

Unpacked Size

3.88 kB

Total Files

5

Last publish

Collaborators

  • nlouda10