node package manager

factor

factor numbers

factor

factor numbers

Installation

With component:

$ component install component/factor

With node.js:

$ npm install factor

Example

factor(4) // [2, 2] 
factor(15) // [3, 5] 
factor(25) // [5, 5] 
factor(27) // [3, 3, 3] 

API

factor(n)

Factor n into prime numbers.

Test

npm install
make test

License

MIT