forked from zuriby/Faker.js
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[dist] Re-build library for v3.1.0 release
- Loading branch information
Showing
160 changed files
with
586,721 additions
and
30,272 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -45,21 +45,22 @@ curl http://faker.hook.io?property=name.findName&locale=de | |
|
||
### Faker.fake() | ||
|
||
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. | ||
faker.js contains a super useful generator method `Faker.fake` for combining faker API methods using a mustache string format. | ||
|
||
**Example:** | ||
|
||
``` js | ||
console.log(faker.fake('{{name.lastName}}, {{name.firstName}} {{name.suffix}}')); | ||
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 | ||
### JSDoc API Browser | ||
|
||
[http://marak.github.io/faker.js/](http://marak.github.io/faker.js/) | ||
|
||
A documentation can be generated with `npm run-script doc`. The docs are put into `./doc`. Here is | ||
an overview of all api methods: | ||
### API Methods | ||
|
||
* address | ||
* zipCode | ||
|
@@ -115,6 +116,7 @@ an overview of all api methods: | |
* currencyCode | ||
* currencyName | ||
* currencySymbol | ||
* bitcoinAddress | ||
* hacker | ||
* abbreviation | ||
* adjective | ||
|
@@ -153,6 +155,7 @@ an overview of all api methods: | |
* internet | ||
* avatar | ||
* exampleEmail | ||
* userName | ||
* protocol | ||
* url | ||
|
@@ -165,11 +168,14 @@ an overview of all api methods: | |
* mac | ||
* password | ||
* lorem | ||
* word | ||
* words | ||
* sentence | ||
* sentences | ||
* paragraph | ||
* paragraphs | ||
* text | ||
* lines | ||
* name | ||
* firstName | ||
* lastName | ||
|
@@ -191,13 +197,29 @@ an overview of all api methods: | |
* objectElement | ||
* uuid | ||
* boolean | ||
* word | ||
* words | ||
* image | ||
* locale | ||
* alphaNumeric | ||
* system | ||
* fileName | ||
* commonFileName | ||
* mimeType | ||
* commonFileType | ||
* commonFileExt | ||
* fileType | ||
* fileExt | ||
* directoryPath | ||
* filePath | ||
* semver | ||
|
||
|
||
## Localization | ||
|
||
As of version `v2.0.0` faker.js supports over 27 different language definition packs. | ||
As of version `v2.0.0` faker.js has support for multiple localities. | ||
|
||
The default language is set to English. | ||
The default language locale is set to English. | ||
|
||
Setting a new locale is simple: | ||
|
||
|
@@ -209,7 +231,6 @@ faker.locale = "de"; | |
* de | ||
* de_AT | ||
* de_CH | ||
* el_GR | ||
* en | ||
* en_AU | ||
* en_BORK | ||
|
@@ -225,6 +246,7 @@ faker.locale = "de"; | |
* fr | ||
* fr_CA | ||
* ge | ||
* id_ID | ||
* it | ||
* ja | ||
* ko | ||
|
@@ -245,7 +267,7 @@ faker.locale = "de"; | |
|
||
### Individual Localization Packages | ||
|
||
As of version `v3.0.0` faker.js supports incremental loading of locales. | ||
As of vesion `v3.0.0` faker.js supports incremental loading of locales. | ||
|
||
By default, requiring `faker` will include *all* locale data. | ||
|
||
|
@@ -279,27 +301,45 @@ See: https://github.com/lestoni/faker-cli | |
|
||
### Meteor | ||
|
||
#### Meteor installation | ||
#### Meteor Installation | ||
|
||
meteor add practicalmeteor:faker | ||
``` | ||
meteor add practicalmeteor:faker | ||
``` | ||
|
||
#### meteor usage, both client and server | ||
#### Meteor Usage, both client and server | ||
|
||
var randomName = faker.name.findName(); // Rowan Nikolaus | ||
var randomEmail = faker.internet.email(); // [email protected] | ||
var randomCard = faker.helpers.createCard(); // random contact card containing many properties | ||
```js | ||
var randomName = faker.name.findName(); // Rowan Nikolaus | ||
var randomEmail = faker.internet.email(); // [email protected] | ||
var randomCard = faker.helpers.createCard(); // random contact card containing many properties | ||
``` | ||
|
||
## Building faker.js | ||
|
||
faker uses [gulp](http://gulpjs.com/) to automate it's build process. Running the following build command will generate new browser builds, documentation, and code examples for the project. | ||
|
||
``` | ||
npm run-script build | ||
``` | ||
|
||
## Building JSDocs | ||
|
||
``` | ||
npm run-script doc | ||
``` | ||
|
||
## Version Release Schedule | ||
|
||
faker.js is a popular project used by many organizations and individuals in production settings. Major and Minor version releases are generally on a monthly schedule. Bugs fixes are addressed by severity and fixed as soon as possible. | ||
|
||
If you require the absolute latest version of `faker.js` the `master` branch @ http://github.com/marak/faker.js/ should always be up to date and working. | ||
|
||
## Authors | ||
## Maintainer | ||
|
||
#### Matthew Bergman & Marak Squires | ||
#### Marak Squires | ||
|
||
faker.js - Copyright (c) 2014-2015 | ||
faker.js - Copyright (c) 2016 | ||
Matthew Bergman & Marak Squires | ||
http://github.com/marak/faker.js/ | ||
|
||
|
Oops, something went wrong.