npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

5x-random-str

v1.0.4

Published

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 s

Downloads

19

Readme

introduction

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.

这是一个随机生成的字符串项目,可用于生成任何长度的密码和/或字符串。它还允许自定义随机内容范围,并提供设置分隔符位置和符号的灵活性,而无需任何特定规则或限制。

install

npm install 5x-random-str

import

//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"];

simple default

rs5x.randomStr()
#result
a9ZOLl.@[7@K}RSA

use Number

rs5x.Number(12)
#result
280127374882

use ABC

rs5x.ABC(12)
#result
ZKVWGZYUAZSF

use abc

rs5x.abc(12)
#result
gcdglealiwyv

use ABC_abc

rs5x.ABC_abc(12)
#result
WbMaduuxDgfS

use ABC_abc_123

rs5x.ABC_abc_123()
#result
kPo4gsk5KAC6GoN5

use strongPasswd

rs5x.strongPasswd(12)
#result
#FIKz@bfMoHp

use superPasswd

rs5x.superPasswd()
#result
b,[NoxLTOV-c_1wT

use length,use default chats,use upperCase

rs5x.randomStr(20, [],  true)
#result
$C)5D})MBU*[email protected]!$

use chars array const

rs5x.randomStr(6, [rs5x.CHARS.ABC_XYZ,rs5x.CHARS.abc_xyz],  true)
#result
CGZUYF

use custom chars

rs5x.randomStr(1, ["甲乙丙丁戊己庚辛壬癸","尨"],  true)+rs5x.randomStr(1, ["子丑寅卯辰巳午未申酉戌亥"],  true)
#result
辛卯

use more chars

rs5x.randomStr(32, [
    rs5x.CHARS["+.(~)[]?}|{][,-"],
    rs5x.CHARS["!@#$%^&*()_"]],  true)
#result
^.!)]-!,!{)&])(?[[#|.?]%~]}?}]])

use separator

rs5x.randomStr(32, [
    rs5x.CHARS.ABC_XYZ,
    rs5x.CHARS.abc_xyz,
    rs5x.CHARS["1234567890"]],  false,"-")
#result
6E33-cs8K-mGBW-kg0V-toxp-dFmf-isOB-zShf

use separator step

rs5x.randomStr(32, [
    rs5x.CHARS.ABC_XYZ,
    rs5x.CHARS.abc_xyz,
    rs5x.CHARS["1234567890"]],  true,"__",5)
#result
BATL6__LVCEU__OEKGY__AFZBT__UDZCK__PIR3G__B1

use separator steps

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