randomill-ts
v1.0.2
Published
Randomill is a giant library of random data for (most) programming languages.
Downloads
5
Readme
Randomill TS
A typescript random data library.
Import it:
import {string, number, StringType} from 'randomill-ts';
or require it:
const {string, number, StringType} = require('randomill-ts');
Use It
- Numbers
number(); // Can be used simply (0-1),
number(10); // With a minimum,
number(10, 50); // Or a maximum.
- Strings
Randomill provides all types of data for strings, all shown in the StringType enum:
GibberishLetters,
GibberishNumbers,
Gibberish,
FirstName,
LastName,
City,
Country,
Email,
USState,
PhoneNumber
Simply use one of these:
string(StringType.FirstName);
// For Gibberish, GibberishLetters, and GibberishNumbers, you may also provide a length.
string(StringType.Gibberish, 15);