The class for generating secure IDs, formatting time and much more...
Please make sure you do not instantiate this class. You can access it throughconst somethingRandom = require('some-random-cat').Generation
const somethingRandom = require('some-random-cat').Generation
.formatTime(time)
STATIC
Generation method to format time to 00:00
PARAMETER
TYPE
OPTIONAL
DEFAULT
DESCRIPTION
time
Numberarrow-up-right
❌
none
The time to format.
Returns: Promisearrow-up-right<Stringarrow-up-right>
.generateId(options)
Generation method to secure a well secure UUID.
options
Objectarrow-up-right
✅
The options for the ID.
options.putDash
Booleanarrow-up-right
true
Whether or not to put a -
-
.getAcronym(name)
Generation method to get acronym for a string.
name
String
The string to get acronym for.
.shorten(text, length)
Generation method to shorten a string by length.
text
The string to shorten.
length
Number
The length to shorten.
Last updated 5 years ago
Was this helpful?