0.1.0 • Published 7 years ago
xian-unique-id v0.1.0
常用获取唯一字符串的方法
获取16位包含数字或者字母的唯一字符串,目前位数固定
import xianId from 'xian-unique-id';
console.log(xianId()); // ac3x344817jrkz58
获取指定位数的唯一数字字符串
import xianId from 'xian-unique-id';
/**
* 获取指定长度的数字字符串
* get union number sting'
* @length 字符串长度
* @filterArr 需要过滤的字符串数组
* @count 生成的字符串个数
* @return {[type]} 满足需求的数字字符串数组
*/
console.log(xianId.numberId({
length: 8,
filterArr: ['1112132'],
count: 10,
}));
// [ '47735474','85830435','11263907','59091720','55572414','31755472','55519103','91929767','97417793','82985253' ]
0.1.0
7 years ago