Namespaces
- address
- address
- commerce
- commerce
- company
- company
- database
- database
- date
- date
- finance
- finance
- git
- git
- hacker
- hacker
- helpers
- helpers
- image
- image
- internet
- internet
- lorem
- lorem
- music
- music
- name
- name
- phone
- phone
- random
- random
- system
- system
- time
- time
- unique
- unique
- vehicle
- vehicle
Methods
(static) fake(str)
Generator method for combining faker methods based on string input
Example:
console.log(faker.fake('{{name.lastName}}, {{name.firstName}} {{name.suffix}}'));
//outputs: "Marks, Dean Sr."
This will interpolate the format string with the value of methods name.lastName, name.firstName, and name.suffix
Parameters:
Name | Type | Description |
---|---|---|
str |
string
|
(static) fake(str)
Generator method for combining faker methods based on string input
Example:
console.log(faker.fake('{{name.lastName}}, {{name.firstName}} {{name.suffix}}'));
//outputs: "Marks, Dean Sr."
This will interpolate the format string with the value of methods name.lastName, name.firstName, and name.suffix
Parameters:
Name | Type | Description |
---|---|---|
str |
string
|