Skip to content

Commit

Permalink
chore: format root files (faker-js#64)
Browse files Browse the repository at this point in the history
  • Loading branch information
Shinigami92 authored Jan 10, 2022
1 parent 6ed9f0e commit dd10cc6
Show file tree
Hide file tree
Showing 8 changed files with 101 additions and 103 deletions.
5 changes: 1 addition & 4 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,7 @@
"no-eval": 0,
"no-unused-expressions": 0,
"guard-for-in": 0,
"wrap-iife": [
2,
"any"
],
"wrap-iife": [2, "any"],
"no-use-before-define": [
2,
{
Expand Down
3 changes: 2 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package-lock.json
coverage/
dist/
doc/
examples/browser/js/
CHANGELOG.md
package-lock.json
68 changes: 36 additions & 32 deletions CHANGELOG.md → CHANGELOG_old.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,18 @@ http://github.com/marak/faker.js
## v4.0.0

### Dist

- Update to latest gulp and mocha

### Docs

- `seed()` is on `faker`, not `random`
- Add section for setting seed
- Add Patreon campaign
- Fix demo URL in Readme

### API

- Add dataUri method
- Add additional https option for imageUrl
- Add exports for `az` locality
Expand All @@ -29,6 +32,7 @@ http://github.com/marak/faker.js
- Add IBAN and BIC generator functions

### Fix

- Fix amount and price argument dec for case = 0
- Default shuffle value
- Fix dec for amount in finance
Expand All @@ -43,6 +47,7 @@ http://github.com/marak/faker.js
- Correct spelling

### Locale

- Azerbaijani localization has been added
- Realistic Dutch city naming components
- Add `CZ` Czech
Expand All @@ -57,7 +62,7 @@ http://github.com/marak/faker.js
[fix] Prevent apostrophes in return value of internet#domainWords
[Fix] Display first month as 1 not 0.
[fix] random.uuid not using seeded number generator
[fix] image api size check
[fix] image api size check
[fix] update bower
[fix] implement street suffix
[fix] hacker.phrase - generate random string for each lexical instance
Expand All @@ -69,61 +74,60 @@ http://github.com/marak/faker.js
[api] Added randomness to image generation
[api] adjust findName method to allow for gender based prefixes
[api] [locale] Added basic support for generating UK postcodes
[api] [locale] Added LV (Latvian) locale
[api] [locale] Added LV (Latvian) locale
[api] [locale] Added date for Swedish locale
[api] Added better lorem methods
[api] Added system module
[api] Added finance.bitcoinAddress
```


## v3.0.0 - v2.0.0 - Missing

See commit history on Github for change history
http://github.com/marak/faker.js
See commit history on Github for change history
http://github.com/marak/faker.js

## v2.0.0

* Adds i18n internalization of fake data sets
- Adds i18n internalization of fake data sets
- contributed by Marak
* Reduces surface of API, removes redundant API calls
- Reduces surface of API, removes redundant API calls
- contributed by Marak
* Replaces legacy build system with GulpJS
- Replaces legacy build system with GulpJS
- contributed by Marak
* Replaces legacy browserifying system with Browserify
- Replaces legacy browserifying system with Browserify
- contributed by Marak
* Adds basic financial generators
- contributed by josefsalyer
* Adds internet.userAgent using `random-ua` library
- Adds basic financial generators
- contributed by josefsalyer
- Adds internet.userAgent using `random-ua` library
- contributed by Marak
* Adds currency codes and symbols using `random-ua` library
- Adds currency codes and symbols using `random-ua` library
- contributed by MQuy
* Replaces use of Math.random in favor of `node-mersenne` package
- contributed by Marak
* Adds bower support
- contributed by daytonn
* avatarUrl optimization
- contributed by MQuy
* Fix - Remove `this` scope
- contributed by goliatone
* Fix - IE9 charAt() bug
- Replaces use of Math.random in favor of `node-mersenne` package
- contributed by Marak
- Adds bower support
- contributed by daytonn
- avatarUrl optimization
- contributed by MQuy
- Fix - Remove `this` scope
- contributed by goliatone
- Fix - IE9 charAt() bug
- contributed by beastlike
* Fix - faker.date now returns a Date object instead of JSON
- contributed by Marak
- Fix - faker.date now returns a Date object instead of JSON
- contributed by Marak

##v1.1.0
## v1.1.0

* Fixes random date functions that did not distribute results.
- Fixes random date functions that did not distribute results.
- contributed by pmalouin
* Fixes context of findName
- Fixes context of findName
- contributed by juampi92
* Updates to switch changes over to using 2 args to support min/max
- Updates to switch changes over to using 2 args to support min/max
- contributed by avanderhoorn & edshadi
* Added ISO 3166 countries
- Added ISO 3166 countries
- contributed by MaerF0x0
* UMD support
- UMD support
- contributed by xaka
* Uk Postal Codes
- Uk Postal Codes
- contributed by schmtw
* Undefined global object for webworker fix
- Undefined global object for webworker fix
- contributed by dnbard
10 changes: 5 additions & 5 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ welcome! If you can make `faker.js` better, please read the following contributi

# Important

* Please make sure that you run both `gulp` and tests before making a PR.
- Please make sure that you run both `gulp` and tests before making a PR.

## Support

Expand All @@ -13,13 +13,13 @@ browsers. Keep this in mind, when modifying and/or extending the sources.

## Automation

* The project is being built by [gulp](http://gulpjs.com/) (see [gulpfile](build/gulpfile.js)), destination directory is [build/build](build/build)
* The documentation is auto-generated, based on [build/src](build/src) markdown sources. If you modify the main [Readme.md](Readme.md) file, the Pull Request will be rejected, since it will be overwritten by the upcoming `gulp` execution
* The tests are executing `mocha` against all js contents of [test](test) directory
- The project is being built by [gulp](http://gulpjs.com/) (see [gulpfile](build/gulpfile.js)), destination directory is [build/build](build/build)
- The documentation is auto-generated, based on [build/src](build/src) markdown sources. If you modify the main [Readme.md](Readme.md) file, the Pull Request will be rejected, since it will be overwritten by the upcoming `gulp` execution
- The tests are executing `mocha` against all js contents of [test](test) directory

## Architecture

The sources are located in the [lib](lib) directory. All fake data generators are
divided into namespaces (each namespace being a separate module). Most of the
generators use the *definitions*, which are just plain JavaScript
generators use the _definitions_, which are just plain JavaScript
objects/arrays/strings that are separate for each [locale](lib/locales).
106 changes: 52 additions & 54 deletions Readme.md → README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Coming soon!
### Node.js

```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
Expand Down Expand Up @@ -271,7 +271,6 @@ var randomCard = faker.helpers.createCard(); // random contact card containing m
- vrm
- bicycle


### Faker.fake()

faker.js contains a super useful generator method `Faker.fake` for combining faker API methods using a mustache string format.
Expand All @@ -280,7 +279,7 @@ faker.js contains a super useful generator method `Faker.fake` for combining fak

```js
console.log(
faker.fake("{{name.lastName}}, {{name.firstName}} {{name.suffix}}")
faker.fake('{{name.lastName}}, {{name.firstName}} {{name.suffix}}')
);
```

Expand All @@ -296,56 +295,55 @@ Setting a new locale is simple:

```js
// sets locale to de
faker.locale = "de";
faker.locale = 'de';
```

- az
- ar
- cz
- de
- de_AT
- de_CH
- en
- en_AU
- en_AU_ocker
- en_BORK
- en_CA
- en_GB
- en_IE
- en_IND
- en_US
- en_ZA
- es
- es_MX
- fa
- fi
- fr
- fr_CA
- fr_CH
- ge
- hy
- hr
- id_ID
- it
- ja
- ko
- nb_NO
- ne
- nl
- nl_BE
- pl
- pt_BR
- pt_PT
- ro
- ru
- sk
- sv
- tr
- uk
- vi
- zh_CN
- zh_TW

- az
- ar
- cz
- de
- de_AT
- de_CH
- en
- en_AU
- en_AU_ocker
- en_BORK
- en_CA
- en_GB
- en_IE
- en_IND
- en_US
- en_ZA
- es
- es_MX
- fa
- fi
- fr
- fr_CA
- fr_CH
- ge
- hy
- hr
- id_ID
- it
- ja
- ko
- nb_NO
- ne
- nl
- nl_BE
- pl
- pt_BR
- pt_PT
- ro
- ru
- sk
- sv
- tr
- uk
- vi
- zh_CN
- zh_TW

### Individual Localization Packages

Expand All @@ -357,7 +355,7 @@ In a production environment, you may only want to include the locale data for a

```js
// loads only de locale
var faker = require("faker/locale/de");
var faker = require('faker/locale/de');
```

## Setting a randomness seed
Expand Down Expand Up @@ -421,8 +419,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
Expand Down
4 changes: 1 addition & 3 deletions conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,5 @@
"exclude": ["./lib/locales"]
},

"plugins": [
"plugins/markdown"
]
"plugins": ["plugins/markdown"]
}
6 changes: 3 additions & 3 deletions gulpfile.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
function defaultTask(cb) {
// place code for your default task here
console.log('please run gulp --tasks to see available tasks for faker.js')
console.log('you can then try running a command like `gulp jsdoc`')
console.log('please run gulp --tasks to see available tasks for faker.js');
console.log('you can then try running a command like `gulp jsdoc`');
cb();
}

exports.browser = require('./build/gulp-tasks/browser');
exports.jsdoc = require('./build/gulp-tasks/jsdoc');

exports.default = defaultTask
exports.default = defaultTask;
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// since we are requiring the top level of faker, load all locales by default
var Faker = require('./lib');
var faker = new Faker({ locales: require('./lib/locales') });
module['exports'] = faker;
module['exports'] = faker;

0 comments on commit dd10cc6

Please sign in to comment.