diff options
| author | Marak <[email protected]> | 2021-01-20 19:38:47 -0500 |
|---|---|---|
| committer | Marak <[email protected]> | 2021-01-20 19:38:47 -0500 |
| commit | b6c4205bee87874f0f9fd712a7e265003fea35c8 (patch) | |
| tree | b9336364655d9c1e455f301905bfb0663e7ff016 | |
| parent | 91dc8a3372426bc691be56153b33e81a16459f49 (diff) | |
| download | faker-b6c4205bee87874f0f9fd712a7e265003fea35c8.tar.xz faker-b6c4205bee87874f0f9fd712a7e265003fea35c8.zip | |
Adds Gitter chat link
| -rw-r--r-- | Readme.md | 30 | ||||
| -rw-r--r-- | build/src/docs.md | 1 |
2 files changed, 21 insertions, 10 deletions
@@ -8,6 +8,7 @@ [](#backers) [](#sponsors) +[](https://gitter.im/Faker-js/community) ## Demo @@ -16,6 +17,7 @@ ## Usage ### Browser + ```html <script src = "faker.js" type = "text/javascript"></script> <script> @@ -24,7 +26,9 @@ var randomCard = faker.helpers.createCard(); // random contact card containing many properties </script> ``` + ### Node.js + ```js var faker = require('faker'); @@ -32,6 +36,7 @@ var randomEmail = faker.internet.email(); // [email protected] var randomCard = faker.helpers.createCard(); // random contact card containing many properties ``` + ## API ### JSDoc API Browser @@ -195,6 +200,7 @@ * name * firstName * lastName + * middleName * findName * jobTitle * gender @@ -253,11 +259,13 @@ 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()` ## Localization @@ -351,18 +359,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 ``` @@ -370,15 +380,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 ``` @@ -386,7 +396,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 @@ -399,8 +409,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 diff --git a/build/src/docs.md b/build/src/docs.md index 3b99ffa4..8da7ae35 100644 --- a/build/src/docs.md +++ b/build/src/docs.md @@ -8,6 +8,7 @@ [](#backers) [](#sponsors) +[](https://gitter.im/Faker-js/community) ## Demo |
