Socket
Book a DemoInstallSign in
Socket

@guntur/randid

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@guntur/randid

Generate a random string or id

latest
Source
npmnpm
Version
0.1.0
Version published
Maintainers
1
Created
Source

randid

Build Status npm node

Generate a random string or id

Install

$ npm install @guntur/randid

Usage

const randid = require('@guntur/randid');

randid().then(str => {
    console.log(str);
    //=> l43xxapV9aWq
});

console.log(randid.sync({length: 24}));
//=> x3qAJC3d7ra4IafxmtXEqWkK

API

randid(options)

  • Params:
  • Returns: Promise<string>

randid.sync(options)

  • Params:
  • Returns: <string>

Options

  • length: <number>
    • default: 12

License

MIT © Guntur Poetra

Keywords

random

FAQs

Package last updated on 04 Apr 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