aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrob.scott <[email protected]>2015-03-10 14:35:12 +0000
committerrob.scott <[email protected]>2015-03-10 14:35:12 +0000
commitb225be4ddc5842eabd2c3eddd42aa178db66fb05 (patch)
tree2de593152da269c95572a68fcd2ee3cf4c38900a
parent5b20b2a1cfa783518c50412c35ac0877ab6ca65e (diff)
downloadfaker-b225be4ddc5842eabd2c3eddd42aa178db66fb05.tar.xz
faker-b225be4ddc5842eabd2c3eddd42aa178db66fb05.zip
Updated README to an actual markdown format.
-rw-r--r--Readme.md219
1 files changed, 186 insertions, 33 deletions
diff --git a/Readme.md b/Readme.md
index 4eb761a7..e4001b47 100644
--- a/Readme.md
+++ b/Readme.md
@@ -1,32 +1,34 @@
# faker.js - generate massive amounts of fake data in the browser and node.js
-<img src = "http://imgur.com/KiinQ.png" border = "0">
+
+![faker.js](http://imgur.com/KiinQ.png)
[![Build Status](https://travis-ci.org/Marak/faker.js.svg?branch=master)](https://travis-ci.org/Marak/Faker.js)
## Demo
-<a href="http://marak.com/faker.js/">http://marak.com/faker.js/</a>
+[Demo Site](http://marak.com/faker.js/">http://marak.com/faker.js/)
## USAGE
-### browser -
+### browser
- <script src = "faker.js" type = "text/javascript"></script>
- <script>
- var randomName = faker.name.findName(); // Caitlyn Kerluke
+ <script src = "faker.js" type = "text/javascript"></script>
+ <script>
+ var randomName = faker.name.findName(); // Caitlyn Kerluke
var randomEmail = faker.internet.email(); // [email protected]
var randomCard = faker.helpers.createCard(); // random contact card containing many properties
- </script>
-
-### node.js -
+ </script>
-### usage
+### node.js
- var faker = require('./faker');
+ 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
+ var randomName = faker.name.findName();
+ // OUTPUTS: Rowan Nikolaus
+ var randomEmail = faker.internet.email();
+ // OUTPUTS: [email protected]
+ var randomCard = faker.helpers.createCard();
+ // OUTPUTS: An object containing many properties
### Localization
@@ -36,34 +38,186 @@ The default language is set to English.
Setting a new locale is simple:
-```js
-// sets locale to de
-faker.locale = "de";
-```
+ // sets locale to de
+ faker.locale = "de";
+
Read further for complete list of locales.
## API
-<ul><li>name<ul><li>firstName</li><li>lastName</li><li>findName</li><li>prefix</li><li>suffix</li></ul></li><li>address<ul><li>zipCode</li><li>city</li><li>cityPrefix</li><li>citySuffix</li><li>streetName</li><li>streetAddress</li><li>streetSuffix</li><li>secondaryAddress</li><li>county</li><li>country</li><li>state</li><li>stateAbbr</li><li>latitude</li><li>longitude</li></ul></li><li>phone<ul><li>phoneNumber</li><li>phoneNumberFormat</li><li>phoneFormats</li></ul></li><li>internet<ul><li>avatar</li><li>email</li><li>userName</li><li>domainName</li><li>domainSuffix</li><li>domainWord</li><li>ip</li><li>userAgent</li><li>color</li><li>password</li></ul></li><li>company<ul><li>suffixes</li><li>companyName</li><li>companySuffix</li><li>catchPhrase</li><li>bs</li><li>catchPhraseAdjective</li><li>catchPhraseDescriptor</li><li>catchPhraseNoun</li><li>bsAdjective</li><li>bsBuzz</li><li>bsNoun</li></ul></li><li>image<ul><li>image</li><li>avatar</li><li>imageUrl</li><li>abstract</li><li>animals</li><li>business</li><li>cats</li><li>city</li><li>food</li><li>nightlife</li><li>fashion</li><li>people</li><li>nature</li><li>sports</li><li>technics</li><li>transport</li></ul></li><li>lorem<ul><li>words</li><li>sentence</li><li>sentences</li><li>paragraph</li><li>paragraphs</li></ul></li><li>helpers<ul><li>randomNumber</li><li>randomize</li><li>slugify</li><li>replaceSymbolWithNumber</li><li>shuffle</li><li>mustache</li><li>createCard</li><li>contextualCard</li><li>userCard</li><li>createTransaction</li></ul></li><li>date<ul><li>past</li><li>future</li><li>between</li><li>recent</li></ul></li><li>random<ul><li>number</li><li>array_element</li><li>object_element</li></ul></li><li>finance<ul><li>account</li><li>accountName</li><li>mask</li><li>amount</li><li>transactionType</li><li>currencyCode</li><li>currencyName</li><li>currencySymbol</li></ul></li><li>hacker<ul><li>abbreviation</li><li>adjective</li><li>noun</li><li>verb</li><li>ingverb</li><li>phrase</li></ul></li><li>locales<ul><li>de</li><li>de_AT</li><li>de_CH</li><li>en</li><li>en_AU</li><li>en_BORK</li><li>en_CA</li><li>en_GB</li><li>en_IND</li><li>en_US</li><li>en_au_ocker</li><li>es</li><li>fa</li><li>fr</li><li>it</li><li>ja</li><li>ko</li><li>nb_NO</li><li>nep</li><li>nl</li><li>pl</li><li>pt_BR</li><li>ru</li><li>sk</li><li>sv</li><li>vi</li><li>zh_CN</li></ul></li><li>locale<ul><li>0</li><li>1</li></ul></li><li>localeFallback<ul><li>0</li><li>1</li></ul></li><li>definitions<ul><li>name</li><li>address</li><li>company</li><li>lorem</li><li>hacker</li><li>phone_number</li><li>finance</li><li>internet</li></ul></li></ul>
+* name
+ * firstName
+ * lastName
+ * findName
+ * prefix
+ * suffix
+* address
+ * zipCode
+ * city
+ * cityPrefix
+ * citySuffix
+ * streetName
+ * streetAddress
+ * streetSuffix
+ * secondaryAddress
+ * county
+ * country
+ * state
+ * stateAbbr
+ * latitude
+ * longitude
+* phone
+ * phoneNumber
+ * phoneNumberFormat
+ * phoneFormats
+* internet
+ * avatar
+ * email
+ * userName
+ * domainName
+ * domainSuffix
+ * domainWord
+ * ip
+ * userAgent
+ * color
+ * password
+* company
+ * suffixes
+ * companyName
+ * companySuffix
+ * catchPhrase
+ * catchPhraseAdjective
+ * catchPhraseDescriptor
+ * catchPhraseNoun
+ * bsAdjective
+ * bsBuzz
+ * bsNoun
+* commerce
+ * color
+ * department
+ * productName
+ * price
+* image
+ * image
+ * avatar
+ * imageUrl
+ * abstract
+ * animals
+ * business
+ * cats
+ * city
+ * food
+ * nightlife
+ * fashion
+ * people
+ * nature
+ * sports
+ * technics
+ * transport
+* lorem
+ * words
+ * sentence
+ * sentences
+ * paragraph
+ * paragraphs
+* helpers
+ * randomNumber
+ * randomize
+ * slugify
+ * replaceSymbolWithNumber
+ * shuffle
+ * mustache
+ * createCard
+ * contextualCard
+ * userCard
+ * createTransaction
+* date
+ * past
+ * future
+ * between
+ * recent
+* random
+ * number
+ * array_element
+ * object_element
+* finance
+ * account
+ * accountName
+ * mask
+ * amount
+ * transactionType
+ * currencyCode
+ * currencyName
+ * currencySymbol
+* hacker
+ * abbreviation
+ * adjective
+ * noun
+ * verb
+ * ingverb
+ * phrase
+* locales
+ * de
+ * de_AT
+ * de_CH
+ * en
+ * en_AU
+ * en_BORK
+ * en_CA
+ * en_GB
+ * en_IND
+ * en_US
+ * en_au_ocker
+ * es
+ * fa
+ * fr
+ * it
+ * ja
+ * ko
+ * nb_NO
+ * nep
+ * nl
+ * pl
+ * pt_BR
+ * ru
+ * sk
+ * sv
+ * vi
+ * zh_CN
+* locale
+ * 0
+ * 1
+* localeFallback
+ * 0
+ * 1
+* definitions
+ * name
+ * address
+ * company
+ * lorem
+ * hacker
+ * phone_number
+ * finance
+ * internet
+ * commerce
## Tests
- npm install .
- make test
+
+ npm install .
+ make test
-You can view a code coverage report generated in coverage/lcov-report/index.html.
+You can view a code coverage report generated in `coverage/lcov-report/index.html`.
## Authors
-####Matthew Bergman & Marak Squires
+#### Matthew Bergman & Marak Squires
-<br/>
Copyright (c) 2014 Matthew Bergman & Marak Squires http://github.com/marak/faker.js/
-<br/>
-faker.js was inspired by and has used data definitions from
-<br/>
- https://github.com/stympy/faker/ - Copyright (c) 2007-2010 Benjamin Curtis <br/>
- http://search.cpan.org/~jasonk/Data-Faker-0.07/ - Copyright 2004-2005 by Jason Kohles <br/>
+faker.js was inspired by and has used data definitions from:
+
+* [https://github.com/stympy/faker/](https://github.com/stympy/faker/) - Copyright (c) 2007-2010 Benjamin Curtis <br/>
+* [http://search.cpan.org/~jasonk/Data-Faker-0.07/](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
@@ -72,11 +226,10 @@ without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
-<br/>
-The above copyright notice and this permission notice shall be
+
+* The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
-<br/>
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE