safe-shortid
v1.0.0
Published
A library for generating safe short IDs with inappropriate word filtering
Downloads
5
Maintainers
Readme
safe-shortid
A library for generating safe short IDs that automatically filters out potentially inappropriate words.
Installation
npm install safe-shortid
# or
yarn add safe-shortid
# or
pnpm add safe-shortidUsage
// ESM
import { generate } from 'safe-shortid';
// CommonJS
const { generate } = require('safe-shortid');
// Generate an ID
const id = generate();
console.log(id); // Example: "abc123"Features
- Generates short, unique IDs
- Automatically filters out inappropriate words
- Works in both Node.js and browsers
- Written in TypeScript with full type definitions
- Supports both ESM and CommonJS
License
MIT
