dsh-random
文件与数据 活跃维护

dsh-random

uckkk/dsh-random

加密安全随机数生成器,可输出安全随机整数、随机字符串,支持数组随机抽样与洗牌操作,API 简洁易用,无需复杂配置即可快速集成到 Node.js 项目中使用

0
Stars 标星
0
Forks 分支
0
Watchers 关注
0
Open Issues
JavaScript
主要语言
MIT
开源协议
5 KB
仓库大小
1 个月前
最后推送
一键安装扩展 / 插件指令
dsh plugin --profile web add github:uckkk/dsh-random
git clone https://github.com/uckkk/dsh-random.git
git clone git@github.com:uckkk/dsh-random.git
README.md main

dsh-random · 随机工具

安全随机整数/字符串、数组抽样与洗牌。纯 Node(crypto)实现。

提供的工具

工具 作用
random_int 随机整数
random_string 随机字符串
random_pick 抽样/洗牌

安装

dsh plugin add dsh-random

安装后在 profile 的 package.json 的 dsh.profile.bundles 中加入 "dsh-random"。

用法示例

生成一个 6 位数字验证码
→ 调用 random_string(length=6, charset="digit")

安装

dsh plugin add github:uckkk/dsh-random

安装即在本机运行第三方代码,请自行审阅源码。

安装

dsh plugin add github:uckkk/dsh-random

使用

安装后在会话中调用该插件注册的工具即可。

许可

MIT

安装即在本机运行第三方代码,请自行审阅源码。