This is a randomly generated string project that can be used to generate passwords and/or strings of any length. It also allows customization of the random content range and provides the flexibility to set the delimiter positions and symbols without any specific rules or restrictions.
这是一个随机生成的字符串项目,可用于生成任何长度的密码和/或字符串。它还允许自定义随机内容范围,并提供设置分隔符位置和符号的灵活性,而无需任何特定规则或限制。
npm install 5x-random-str
//commonjs
const rs5x = require("5x-random-str")
//es6+
import * as rs5x from "5x-random-str";
//iife
<script src="https://unpkg.com/5x-random-str/index.js"></script>
const rs5x = window["5x-random-str"];
rs5x.randomStr()
#result
a9ZOLl.@[7@K}RSA
rs5x.Number(12)
#result
280127374882
rs5x.ABC(12)
#result
ZKVWGZYUAZSF
rs5x.abc(12)
#result
gcdglealiwyv
rs5x.ABC_abc(12)
#result
WbMaduuxDgfS
rs5x.ABC_abc_123()
#result
kPo4gsk5KAC6GoN5
rs5x.strongPasswd(12)
#result
#FIKz@bfMoHp
rs5x.superPasswd()
#result
b,[NoxLTOV-c_1wT
rs5x.randomStr(20, [], true)
#result
$C)5D})MBU*?U![email protected]!$
rs5x.randomStr(6, [rs5x.CHARS.ABC_XYZ,rs5x.CHARS.abc_xyz], true)
#result
CGZUYF
rs5x.randomStr(1, ["甲乙丙丁戊己庚辛壬癸","尨"], true)+rs5x.randomStr(1, ["子丑寅卯辰巳午未申酉戌亥"], true)
#result
辛卯
rs5x.randomStr(32, [
rs5x.CHARS["+.(~)[]?}|{][,-"],
rs5x.CHARS["!@#$%^&*()_"]], true)
#result
^.!)]-!,!{)&])(?[[#|.?]%~]}?}]])
rs5x.randomStr(32, [
rs5x.CHARS.ABC_XYZ,
rs5x.CHARS.abc_xyz,
rs5x.CHARS["1234567890"]], false,"-")
#result
6E33-cs8K-mGBW-kg0V-toxp-dFmf-isOB-zShf
rs5x.randomStr(32, [
rs5x.CHARS.ABC_XYZ,
rs5x.CHARS.abc_xyz,
rs5x.CHARS["1234567890"]], true,"__",5)
#result
BATL6__LVCEU__OEKGY__AFZBT__UDZCK__PIR3G__B1
rs5x.randomStr(32, [
rs5x.CHARS.ABC_XYZ,
rs5x.CHARS.abc_xyz,
rs5x.CHARS["1234567890"]], false,"-",[4,4,4,8])
#result
xFWh-G1N8-lYcf-skfGREvM-MoKOo63d0PZK