@karlbateman/trident
v1.0.0
Published
Generate project codes
Downloads
1
Maintainers
Readme
Trident
Project code generation module
Useful for naming projects which are not yet formerly named or which require something more obscure.
Install
$ npm install @karlbateman/trident
Usage
See the below example for a default usage.
const Trident = require('@karlbateman/trident');
const trident = Trident();
trident.generate();
//=> 'ABC-XYZ'
trident.generate('+');
//=> 'ABC+XYZ'
trident.generate(':', 12);
//=> 'ABC:DEF:GHI:JKL'
The following example shows Trident using an alternative charcode range [0-9].
const Trident = require('@karlbateman/trident');
const trident = Trident(48, 57);
trident.generate();
//=> '123-789';
trident.generate('|');
//=> '123|789'
trident.generate(',', 9);
//=> '123,456,789'