prefixed-uuid

1.0.0 • Public • Published

prefixed-uuid

prefixed-uuid is a tiny module that adds optional prefixes to UUIDs.

Installation

npm install prefixed-uuid

Usage

var uuid = require( 'prefixed-uuid' );
 
uuid();
// '0428ccac-e9f0-4485-85f6-382ca438136f'
 
uuid( 'my-prefix' );
// 'my-prefix-bfe89a5c-6766-4acf-89be-70a122012f1a'
 
uuid( 'my-prefix', 'v1' );
// 'my-prefix-f3cc5d20-15a5-11e2-bec9-510613aafe0d'
 
uuid( null, 'v1' );
// 'fd8fe7f0-15a5-11e2-bec9-510613aafe0d'

/prefixed-uuid/

    Package Sidebar

    Install

    npm i prefixed-uuid

    Weekly Downloads

    3

    Version

    1.0.0

    License

    MIT

    Last publish

    Collaborators

    • tristanls