Skip to content

Commit 868ab94

Browse files
committedAug 23, 2020
Update generated docs and ReadMe
Update Licenses
1 parent efa4c64 commit 868ab94

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+75291
-2560
lines changed
 

‎MIT-LICENSE.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
faker.js - Copyright (c) 2010-2015
2-
Matthew Bergman & Marak Squires
1+
faker.js - Copyright (c) 2020
2+
Marak Squires
33
http://github.com/marak/faker.js/
44

55
faker.js was inspired by and has used data definitions from:

‎Readme.md

+60-68
Original file line numberDiff line numberDiff line change
@@ -13,51 +13,26 @@
1313

1414
[https://rawgit.com/Marak/faker.js/master/examples/browser/index.html](https://rawgit.com/Marak/faker.js/master/examples/browser/index.html)
1515

16-
## Hosted API Microservice
17-
18-
[http://faker.hook.io](http://faker.hook.io/)
19-
- Supports all Faker API Methods
20-
- Full-Featured Microservice
21-
- Hosted by [hook.io](http://hook.io)
22-
23-
```bash
24-
curl http://faker.hook.io?property=name.findName&locale=de
25-
```
26-
2716
## Usage
2817

2918
### Browser
30-
19+
```html
3120
<script src = "faker.js" type = "text/javascript"></script>
3221
<script>
3322
var randomName = faker.name.findName(); // Caitlyn Kerluke
3423
var randomEmail = faker.internet.email(); // Rusty@arne.info
3524
var randomCard = faker.helpers.createCard(); // random contact card containing many properties
3625
</script>
37-
26+
```
3827
### Node.js
39-
28+
```js
4029
var faker = require('faker');
4130

4231
var randomName = faker.name.findName(); // Rowan Nikolaus
4332
var randomEmail = faker.internet.email(); // Kassandra.Haley@erich.biz
4433
var randomCard = faker.helpers.createCard(); // random contact card containing many properties
45-
46-
## API
47-
48-
49-
### Faker.fake()
50-
51-
faker.js contains a super useful generator method `Faker.fake` for combining faker API methods using a mustache string format.
52-
53-
**Example:**
54-
55-
``` js
56-
console.log(faker.fake("{{name.lastName}}, {{name.firstName}} {{name.suffix}}"));
57-
// outputs: "Marks, Dean Sr."
5834
```
59-
60-
This will interpolate the format string with the value of methods `name.lastName()`, `name.firstName()`, and `name.suffix()`
35+
## API
6136

6237
### JSDoc API Browser
6338

@@ -67,6 +42,7 @@ This will interpolate the format string with the value of methods `name.lastName
6742

6843
* address
6944
* zipCode
45+
* zipCodeByState
7046
* city
7147
* cityPrefix
7248
* citySuffix
@@ -82,6 +58,10 @@ This will interpolate the format string with the value of methods `name.lastName
8258
* stateAbbr
8359
* latitude
8460
* longitude
61+
* direction
62+
* cardinalDirection
63+
* ordinalDirection
64+
* nearbyGPSCoordinate
8565
* commerce
8666
* color
8767
* department
@@ -120,16 +100,26 @@ This will interpolate the format string with the value of methods `name.lastName
120100
* finance
121101
* account
122102
* accountName
103+
* routingNumber
123104
* mask
124105
* amount
125106
* transactionType
126107
* currencyCode
127108
* currencyName
128109
* currencySymbol
129110
* bitcoinAddress
111+
* litecoinAddress
112+
* creditCardNumber
113+
* creditCardCVV
130114
* ethereumAddress
131115
* iban
132116
* bic
117+
* git
118+
* branch
119+
* commitEntry
120+
* commitMessage
121+
* commitSha
122+
* shortSha
133123
* hacker
134124
* abbreviation
135125
* adjective
@@ -142,6 +132,9 @@ This will interpolate the format string with the value of methods `name.lastName
142132
* slugify
143133
* replaceSymbolWithNumber
144134
* replaceSymbols
135+
* replaceCreditCardSymbols
136+
* repeatString
137+
* regexpStyleStringParse
145138
* shuffle
146139
* mustache
147140
* createCard
@@ -166,6 +159,8 @@ This will interpolate the format string with the value of methods `name.lastName
166159
* technics
167160
* transport
168161
* dataUri
162+
* lorempixel
163+
* unsplash
169164
* internet
170165
* avatar
171166
* email
@@ -197,6 +192,7 @@ This will interpolate the format string with the value of methods `name.lastName
197192
* lastName
198193
* findName
199194
* jobTitle
195+
* gender
200196
* prefix
201197
* suffix
202198
* title
@@ -211,13 +207,15 @@ This will interpolate the format string with the value of methods `name.lastName
211207
* number
212208
* float
213209
* arrayElement
210+
* arrayElements
214211
* objectElement
215212
* uuid
216213
* boolean
217214
* word
218215
* words
219216
* image
220217
* locale
218+
* alpha
221219
* alphaNumeric
222220
* hexaDecimal
223221
* system
@@ -231,7 +229,31 @@ This will interpolate the format string with the value of methods `name.lastName
231229
* directoryPath
232230
* filePath
233231
* semver
232+
* time
233+
* recent
234+
* unique
235+
* vehicle
236+
* vehicle
237+
* manufacturer
238+
* model
239+
* type
240+
* fuel
241+
* vin
242+
* color
243+
234244

245+
### Faker.fake()
246+
247+
faker.js contains a super useful generator method `Faker.fake` for combining faker API methods using a mustache string format.
248+
249+
**Example:**
250+
251+
``` js
252+
console.log(faker.fake("{{name.lastName}}, {{name.firstName}} {{name.suffix}}"));
253+
// outputs: "Marks, Dean Sr."
254+
```
255+
256+
This will interpolate the format string with the value of methods `name.lastName()`, `name.firstName()`, and `name.suffix()`
235257

236258
## Localization
237259

@@ -243,32 +265,31 @@ Setting a new locale is simple:
243265

244266
```js
245267
// sets locale to de
246-
faker.setLocale("de");
247-
// or
248268
faker.locale = "de";
249269
```
250270

251271
* az
272+
* ar
252273
* cz
253274
* de
254275
* de_AT
255276
* de_CH
256277
* en
257278
* en_AU
279+
* en_AU_ocker
258280
* en_BORK
259281
* en_CA
260282
* en_GB
261283
* en_IE
262284
* en_IND
263-
* en_NG
264285
* en_US
265286
* en_ZA
266-
* en_au_ocker
267287
* es
268288
* es_MX
269289
* fa
270290
* fr
271291
* fr_CA
292+
* fr_CH
272293
* ge
273294
* id_ID
274295
* it
@@ -277,9 +298,11 @@ faker.locale = "de";
277298
* nb_NO
278299
* nep
279300
* nl
301+
* nl_BE
280302
* pl
281303
* pt_BR
282304
* pt_PT
305+
* ro
283306
* ru
284307
* sk
285308
* sv
@@ -292,7 +315,7 @@ faker.locale = "de";
292315

293316
### Individual Localization Packages
294317

295-
As of vesion `v3.0.0` faker.js supports incremental loading of locales.
318+
As of vesion `v3.0.0` faker.js supports incremental loading of locales.
296319

297320
By default, requiring `faker` will include *all* locale data.
298321

@@ -327,39 +350,9 @@ console.log(firstRandom === secondRandom);
327350

328351
You can view a code coverage report generated in coverage/lcov-report/index.html.
329352

330-
## Projects Built with faker.js
331-
332-
### Fake JSON Schema
333-
334-
Use faker generators to populate JSON Schema samples.
335-
See: https://github.com/pateketrueke/json-schema-faker/
336-
337-
### CLI
338-
339-
Run faker generators from Command Line.
340-
See: https://github.com/lestoni/faker-cli
341-
342-
**Want to see your project added here? Let us know!**
343-
344-
### Meteor
345-
346-
#### Meteor Installation
347-
348-
```
349-
meteor add practicalmeteor:faker
350-
```
351-
352-
#### Meteor Usage, both client and server
353-
354-
```js
355-
var randomName = faker.name.findName(); // Rowan Nikolaus
356-
var randomEmail = faker.internet.email(); // Kassandra.Haley@erich.biz
357-
var randomCard = faker.helpers.createCard(); // random contact card containing many properties
358-
```
359-
360353
## Building faker.js
361354

362-
faker uses [gulp](http://gulpjs.com/) to automate its build process. Running the following build command will generate new browser builds, documentation, and code examples for the project.
355+
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.
363356

364357
```
365358
npm run-script build
@@ -381,8 +374,9 @@ If you require the absolute latest version of `faker.js` the `master` branch @ h
381374

382375
#### Marak Squires
383376

384-
faker.js - Copyright (c) 2017
377+
faker.js - Copyright (c) 2020
385378
Marak Squires
379+
www.marak.com
386380
http://github.com/marak/faker.js/
387381

388382
faker.js was inspired by and has used data definitions from:
@@ -409,8 +403,6 @@ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
409403
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
410404
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
411405

412-
413-
414406
## Backers
415407

416408
Support us with a monthly donation and help us continue our activities. [[Become a backer](https://opencollective.com/fakerjs#backer)]

0 commit comments

Comments
 (0)
Please sign in to comment.