Zeptoid
A tiny isomorphic fast function for generating a cryptographically random hex string.
Install / Use
/learn @fabiospampinato/ZeptoidREADME
ZeptoID
A tiny isomorphic fast function for generating a cryptographically random hex string.
Accoding to this calculator one would have to generate ids at a rate of 1 billion per second for ~83 years to have a 1% probability of finding a collision.
Comparison
Compared to nanoid there are the following differences:
zeptoidis 50% faster.zeptoidhas a ~5x bigger space of possible unique strings that could be generated.zeptoidis not customizable in any way, it will always simply output a 32-characters hex string.zeptoiduses only the 16-characters of the hexadecimal alphabet, which makes the ids more human-friendly.
Install
npm install zeptoid
Usage
import zeptoid, {is} from 'zeptoid';
// Let's generate ids
zeptoid (); // => 'aceee829076f33f6626a93ad1fcca776'
zeptoid (); // => '39a07eda327e5b52f903d06303ca97be'
zeptoid (); // => '0c1a4d3f273505565a380022fda07edd'
// Let's check if a string is a zeptoid or not
is ( zeptoid () ); // => true
is ( 'something' ); // => false
License
MIT © Fabio Spampinato
Related Skills
node-connect
352.5kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
111.3kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
352.5kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
352.5kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
