Demo data
This is a helper to create demo data for prototypes. All numeric values offer a
range param to be able to control a random range.
https://www.npmjs.com/package/cropperjs
Methods
$3
creates a random id like
_abcd1234 with random values, always starting with
_
$3
The
number() and
price() expect a range prop to define the range of random.
type Range = number | [number, number];
Will create a random natural number in the range provided by the param.
- When providing a number it will have the range from 0 to the provided number
- When providing an array the values will work as [min, max]
$3
Will provide something like
1.234 € and uses the range from
number()$3
Will throw a coin to decide wether it is true or false. The optional param can set the chances between 0 and 1 as a
percentage chance to be true
$3
Returns a random name like
Abandoned Information$3
A random date within the range. Per default this is 1.1.2018 - now
$3
Will create a lorem ipsum text with a random length calculated by the length param.
$3
Usually used to create an array of a specific length to map or otherwise loop over.
By default the array consists of random ids. A passed callback can set custom string values instead.