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.
Merge pull request #992 from TastefulElk/chore/cleanup
fix spelling & formatting mistakes
- Loading branch information
Showing
7 changed files
with
6,149 additions
and
6,141 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 |
---|---|---|
|
@@ -16,6 +16,7 @@ | |
## Usage | ||
|
||
### Browser | ||
|
||
```html | ||
<script src = "faker.js" type = "text/javascript"></script> | ||
<script> | ||
|
@@ -24,14 +25,17 @@ | |
var randomCard = faker.helpers.createCard(); // random contact card containing many properties | ||
</script> | ||
``` | ||
|
||
### Node.js | ||
|
||
```js | ||
var faker = require('faker'); | ||
|
||
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 | ||
``` | ||
|
||
## API | ||
|
||
### JSDoc API Browser | ||
|
@@ -49,10 +53,12 @@ faker.js contains a super useful generator method `Faker.fake` for combining fak | |
**Example:** | ||
|
||
{{=<% %>=}} | ||
|
||
``` 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()` | ||
|
@@ -104,42 +110,44 @@ console.log(firstRandom === secondRandom); | |
|
||
## Tests | ||
|
||
npm install . | ||
make test | ||
```shell | ||
npm install . | ||
make test | ||
``` | ||
|
||
You can view a code coverage report generated in coverage/lcov-report/index.html. | ||
|
||
## Building faker.js | ||
|
||
faker uses [gulp](http://gulpjs.com/) to automate it's build process. Each build operation is a separate task which can be run independently. | ||
faker uses [gulp](http://gulpjs.com/) to automate its build process. Each build operation is a separate task which can be run independently. | ||
|
||
### Browser Bundle | ||
|
||
``` | ||
```shell | ||
npm run browser | ||
``` | ||
|
||
### Building JSDocs | ||
|
||
[JSDOC](https://jsdoc.app/) v3 HTML API documentation | ||
|
||
``` | ||
```shell | ||
npm run jsdoc | ||
``` | ||
|
||
### Building ReadMe | ||
|
||
The `ReadMe.md` file for `faker.js` is automatically generated and should not be modified directly. All updateds to `ReadMe.md` should be perfomed in `./build/src/docs.md` and then the build script should be run. | ||
The `ReadMe.md` file for `faker.js` is automatically generated and should not be modified directly. All updates to `ReadMe.md` should be performed in `./build/src/docs.md` and then the build script should be run. | ||
|
||
``` | ||
```shell | ||
npm run readme | ||
``` | ||
|
||
## 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. | ||
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. | ||
|
||
## Maintainer | ||
|
||
|
@@ -152,8 +160,8 @@ http://github.com/marak/faker.js/ | |
|
||
faker.js was inspired by and has used data definitions from: | ||
|
||
* https://github.com/stympy/faker/ - Copyright (c) 2007-2010 Benjamin Curtis | ||
* http://search.cpan.org/~jasonk/Data-Faker-0.07/ - Copyright 2004-2005 by Jason Kohles | ||
* <https://github.com/stympy/faker/> - Copyright (c) 2007-2010 Benjamin Curtis | ||
* <http://search.cpan.org/~jasonk/Data-Faker-0.07/> - Copyright 2004-2005 by Jason Kohles | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining | ||
a copy of this software and associated documentation files (the | ||
|
Oops, something went wrong.