aboutsummaryrefslogtreecommitdiff
path: root/build/src/docs.md
diff options
context:
space:
mode:
authorSebastian Pettersson <[email protected]>2020-09-06 13:54:53 +0200
committerSebastian Pettersson <[email protected]>2020-09-06 13:54:53 +0200
commit9c65e5dd4902dbdf12088c36c098a9d7958afe09 (patch)
treee060dd8a2198bcc6082ffe86f1010d051bace251 /build/src/docs.md
parent81f1adf754a815b3f6fa10ec8c577572206f3c71 (diff)
downloadfaker-9c65e5dd4902dbdf12088c36c098a9d7958afe09.tar.xz
faker-9c65e5dd4902dbdf12088c36c098a9d7958afe09.zip
fix spelling & formatting mistakes
Diffstat (limited to 'build/src/docs.md')
-rw-r--r--build/src/docs.md28
1 files changed, 18 insertions, 10 deletions
diff --git a/build/src/docs.md b/build/src/docs.md
index 0334f97e..3b99ffa4 100644
--- a/build/src/docs.md
+++ b/build/src/docs.md
@@ -16,6 +16,7 @@
## Usage
### Browser
+
```html
<script src = "faker.js" type = "text/javascript"></script>
<script>
@@ -24,7 +25,9 @@
var randomCard = faker.helpers.createCard(); // random contact card containing many properties
</script>
```
+
### Node.js
+
```js
var faker = require('faker');
@@ -32,6 +35,7 @@
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,18 +110,20 @@ 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
```
@@ -123,15 +131,15 @@ npm run browser
[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
```
@@ -139,7 +147,7 @@ npm run readme
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