JSPM

safe-shortid

1.0.0
    • ESM via JSPM
    • ES Module Entrypoint
    • Export Map
    • Keywords
    • License
    • Repository URL
    • TypeScript Types
    • README
    • Created
    • Published
    • Downloads 5
    • Score
      100M100P100Q34305F
    • License MIT

    A library for generating safe short IDs with inappropriate word filtering

    Package Exports

    • safe-shortid
    • safe-shortid/dist/index.js

    This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (safe-shortid) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

    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-shortid

    Usage

    // 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