diff options
| author | Marak <[email protected]> | 2015-07-08 20:53:24 -0700 |
|---|---|---|
| committer | Marak <[email protected]> | 2015-07-08 20:53:24 -0700 |
| commit | 18055d7183f0d9db7199a975a01f39b52985d668 (patch) | |
| tree | edb6fd750b54d0e131f028e323d0e9421827c9d0 | |
| parent | a118970baa9953a7fcbc9b01f7780046b3840ede (diff) | |
| download | faker-18055d7183f0d9db7199a975a01f39b52985d668.tar.xz faker-18055d7183f0d9db7199a975a01f39b52985d668.zip | |
[docs] Updating README
| -rw-r--r-- | Readme.md | 12 |
1 files changed, 7 insertions, 5 deletions
@@ -31,19 +31,21 @@ ## API -## Faker.fake() Generator +### Faker.fake() -As of version `v3.0.0` faker.js contains a super useful generator method for combining faker methods using a mustache string format. +As of version `v3.0.0` faker.js contains a super useful generator method `Faker.fake` for combining faker API methods using a mustache string format. -Example: +**Example:** -```js -console.log(faker.fake(', ')); +``` js +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()` +### API Methods + * address * zipCode * city |
