to-digits
1.2.1 • Public • Published to-digits
Converts a number to an array of its digits.
Install
$ npm install to-digits
var toDigits = require('to-digits');
Usage
toDigits(number)
toDigits.extend
Use this to extend the native Number.prototype:
Number.prototype.toDigits = toDigits.extend
console.log((456).toDigits())
Package Sidebar
Install
Weekly Downloads