1.5.9 • Published 2 years ago
lesca-number v1.5.9
Why use it?
some useful calculation formula.
Live Demo
Installation
npm install lesca-number --saveUsage
As a Node module:
import {
Pad,
Uid,
Dollar,
CoverSize,
} from 'lesca-number';
for (var i = 0; i < 100; i++) {
let img_url = `./${Pad(i, 4)}.png`;
console.log(img_url); // => 0001.png ~ 0100.png
}
console.log(Uid(10)); // => c38c995b8d (random)
console.log(Dollar(93848421100)); // => 93,848,421,100
console.log(CoverSize({ width: 720, height: 420 }, { width: 1000, height: 1000 }));Development
| method | description | default |
|---|---|---|
| .Pad(num:int, max:int):string | the index of numbers | max = 4 |
| .Uid(len:int):string | length of numbers | 10 |
| .Dollar(num:int):string | 1130200 => 1,130,200 | |
| .CoverSize(imageSize:object, containerSize:object):object | calculator cover size |
Features
- maintain if necessary
1.5.9
2 years ago
1.5.8
2 years ago
1.5.7
2 years ago
1.5.6
2 years ago
1.5.5
2 years ago
1.5.4
2 years ago
1.5.3
3 years ago
1.5.1
3 years ago
1.5.0
3 years ago
1.4.0
3 years ago
1.3.1
4 years ago
1.3.0
4 years ago
1.2.0
5 years ago
1.1.10
5 years ago
1.1.9
5 years ago
1.1.8
5 years ago
1.1.7
5 years ago
1.1.6
5 years ago
1.1.5
5 years ago
1.1.4
5 years ago
1.1.3
5 years ago
1.1.1
5 years ago
1.1.0
5 years ago
1.1.2
5 years ago
1.0.0
5 years ago