hrbu-util
v1.0.0
Published
提供了格式化时间,生成4、6位验证码
Maintainers
Readme
安装
npm install hrbu-util导入
const hrbuUtil = require("hrbu-util");
格式化时间
// 调用 dataFormat 对时间进行格式化
const dtStr = hrbuUtil.dateFormat(new Date());
// 结果 2022-3-24 20:01:334位验证码
// 获取4位字母与数字组成的验证码
const dtStr = hrbuUtil.verificationCode(4);
// 结果 rds76位验证码
// 获取6位字母与数字组成的验证码
const dtStr = hrbuUtil.verificationCode(6);
// 结果 vr9ktc