Chuyển đến nội dung chính

dsh-random

Đã xác minh

dsh-random · v0.1.0 · MIT

随机工具:安全随机整数/字符串、数组抽样与洗牌(crypto)

Cài đặt

dsh plugin add dsh-random

Xác nhận layer đã áp bằng dsh --profile default --dump-config — xem hướng dẫn cài plugin.

Mã nguồn

Phát hành lên npm mà không có repository công khai. Hãy kiểm tra nội dung package trước khi cài.

Thẻ

Readme

dsh-random · 随机工具

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

提供的工具

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

安装

dsh plugin add dsh-random

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

用法示例

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