New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

named-ids

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

named-ids

A library to generate random, seedable, short human readable strings similar to or in place of an ID.

latest
Source
npmnpm
Version
1.0.2
Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

Named Ids

Actions Status

Makes generating one-way randomized-but-readable identifiers easy.

Usage

Import

// ES6
import { getNamedId, getNameIdParts } from 'named-ids';

// Node
const { getNamedId, getNameIdParts } = require('named-ids');

Generate random generated names

getNamedId();
// "fishy otters"

getNamedId();
// "twitchy pigs"

Seeded randoms produce same result every time

getNamedId("ABC");
// "rowdy rhinos"
getNamedId("ABC");
// "rowdy rhinos"

getNamedId("XYZ");
// "fat turtles"
getNamedId("XYZ");
// "fat turtles"

Seeded randoms produce same result every time

getNamedId("ABC");
// "rowdy rhinos"
getNamedId("ABC");
// "rowdy rhinos"

getNamedId("XYZ");
// "fat turtles"
getNamedId("XYZ");
// "fat turtles"

FAQs

Package last updated on 31 Dec 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts