x-number
v1.0.1
Published
JsDK of Number Class
Downloads
90
Maintainers
Readme
x-number :
JsDK of Number Class
Install :
npm install x-number --save;
Features :
1. isEven :
var n=122;
n.isEven(); // true
(n+1).isEven(); //false
2. isOdd :
var n=123;
n.isOdd(); // true
(n+1).isOdd(); //false
3. ..
:
Make a range of numbers and out as Array :
(1)['..'](10);
// [1,2,3,4,5,6,7,8,9,10]
(3)['..'](5);
// [3,4,5]
(10)['..'](120,30) // increment by 30
// [40,70,100]
4. toRoman :
var n=4;
n.toRoman();
//-- IV
(61).toRoman();
//-- LXI
5. fromRoman (static):
Number.fromRoman('XXIII');
// 23