├── .babelrc ├── .eslintrc.js ├── .gitignore ├── .npmignore ├── .publishrc ├── .travis.yml ├── CHANGELOG.md ├── LICENSE ├── LOCALES.md ├── README.md ├── bower.json ├── config ├── webpack.base.config.js ├── webpack.build.config.js └── webpack.test.config.js ├── demo └── index.js ├── dist ├── fakerator.d.ts ├── fakerator.js ├── fakerator.min.js └── locales │ ├── cs-CZ.js │ ├── cs-CZ.min.js │ ├── de-DE.js │ ├── de-DE.min.js │ ├── default.js │ ├── default.min.js │ ├── en-AU.js │ ├── en-AU.min.js │ ├── en-CA.js │ ├── en-CA.min.js │ ├── es-ES.js │ ├── es-ES.min.js │ ├── fr-FR.js │ ├── fr-FR.min.js │ ├── hu-HU.js │ ├── hu-HU.min.js │ ├── it-IT.js │ ├── it-IT.min.js │ ├── nb-NO.js │ ├── nb-NO.min.js │ ├── pl-PL.js │ ├── pl-PL.min.js │ ├── pt-BR.js │ ├── pt-BR.min.js │ ├── ru-RU.js │ ├── ru-RU.min.js │ ├── sk-SK.js │ ├── sk-SK.min.js │ ├── sv-SE.js │ └── sv-SE.min.js ├── fakerator.d.ts ├── lib ├── fakerator.js ├── index.js └── locales │ ├── cs-CZ │ ├── address │ │ ├── city.js │ │ ├── countryWithCodes.js │ │ ├── index.js │ │ └── streetName.js │ ├── build.js │ ├── company │ │ └── index.js │ ├── index.js │ ├── internet │ │ └── index.js │ ├── names │ │ ├── firstNameF.js │ │ ├── firstNameM.js │ │ ├── index.js │ │ ├── lastNameF.js │ │ └── lastNameM.js │ └── phone │ │ └── index.js │ ├── de-DE │ ├── address │ │ ├── countryWithCodes.js │ │ ├── index.js │ │ └── streetName.js │ ├── build.js │ ├── company │ │ └── index.js │ ├── index.js │ ├── internet │ │ └── index.js │ ├── names │ │ ├── firstName.js │ │ ├── index.js │ │ ├── lastName.js │ │ └── nobilityTitlePrefix.js │ └── phone │ │ └── index.js │ ├── default │ ├── address │ │ ├── countryWithCodes.js │ │ ├── geoLocationNearBy.js │ │ ├── index.js │ │ ├── state.js │ │ ├── stateAbbr.js │ │ └── streetSuffix.js │ ├── build.js │ ├── company │ │ └── index.js │ ├── date │ │ ├── index.js │ │ └── timezone.js │ ├── entity │ │ └── index.js │ ├── index.js │ ├── internet │ │ ├── index.js │ │ ├── tld.js │ │ └── uifaces.js │ ├── lorem │ │ ├── index.js │ │ ├── supplemental.js │ │ └── word.js │ ├── misc │ │ └── index.js │ ├── names │ │ ├── firstNameFemale.js │ │ ├── firstNameMale.js │ │ ├── index.js │ │ └── lastName.js │ └── phone │ │ └── index.js │ ├── en-AU │ ├── address │ │ ├── countryWithCodes.js │ │ ├── index.js │ │ └── streetSuffix.js │ ├── build.js │ ├── company │ │ └── index.js │ ├── index.js │ ├── internet │ │ └── index.js │ ├── names │ │ ├── firstName.js │ │ ├── index.js │ │ └── lastName.js │ └── phone │ │ └── index.js │ ├── en-CA │ ├── address │ │ ├── index.js │ │ └── streetSuffix.js │ ├── build.js │ ├── index.js │ ├── internet │ │ └── index.js │ └── phone │ │ └── index.js │ ├── es-ES │ ├── address │ │ ├── cityName.js │ │ ├── countryWithCodes.js │ │ ├── index.js │ │ └── streetSuffix.js │ ├── build.js │ ├── company │ │ └── index.js │ ├── index.js │ ├── internet │ │ └── index.js │ ├── names │ │ ├── firstName.js │ │ ├── index.js │ │ └── lastName.js │ └── phone │ │ └── index.js │ ├── fr-FR │ ├── address │ │ ├── cityName.js │ │ ├── countryWithCodes.js │ │ ├── index.js │ │ ├── streetPrefix.js │ │ └── streetSuffix.js │ ├── build.js │ ├── company │ │ └── index.js │ ├── index.js │ ├── internet │ │ └── index.js │ ├── names │ │ ├── firstName.js │ │ ├── index.js │ │ └── lastName.js │ └── phone │ │ └── index.js │ ├── hu-HU │ ├── address │ │ ├── countryWithCodes.js │ │ └── index.js │ ├── build.js │ ├── company │ │ └── index.js │ ├── index.js │ ├── internet │ │ └── index.js │ ├── names │ │ ├── firstNameFemale.js │ │ ├── firstNameMale.js │ │ ├── index.js │ │ └── lastName.js │ └── phone │ │ └── index.js │ ├── it-IT │ ├── address │ │ ├── countryWithCodes.js │ │ ├── index.js │ │ ├── state.js │ │ ├── stateAbbr.js │ │ └── streetPrefix.js │ ├── build.js │ ├── company │ │ └── index.js │ ├── index.js │ ├── internet │ │ └── index.js │ ├── names │ │ ├── firstName.js │ │ ├── index.js │ │ └── lastName.js │ └── phone │ │ └── index.js │ ├── locale-build.js │ ├── nb-NO │ ├── address │ │ ├── countryWithCodes.js │ │ ├── index.js │ │ ├── streetName.js │ │ └── streetSuffix.js │ ├── build.js │ ├── company │ │ └── index.js │ ├── index.js │ ├── internet │ │ └── index.js │ ├── names │ │ ├── firstNameF.js │ │ ├── firstNameM.js │ │ ├── index.js │ │ └── lastName.js │ └── phone │ │ └── index.js │ ├── pl-PL │ ├── address │ │ ├── cityName.js │ │ ├── countryWithCodes.js │ │ ├── index.js │ │ └── streetSuffix.js │ ├── build.js │ ├── company │ │ └── index.js │ ├── index.js │ ├── internet │ │ └── index.js │ ├── names │ │ ├── firstName.js │ │ ├── index.js │ │ └── lastName.js │ └── phone │ │ └── index.js │ ├── pt-BR │ ├── address │ │ ├── countryWithCodes.js │ │ └── index.js │ ├── build.js │ ├── company │ │ └── index.js │ ├── date │ │ └── index.js │ ├── index.js │ ├── internet │ │ └── index.js │ ├── names │ │ ├── firstNameFemale.js │ │ ├── firstNameMale.js │ │ ├── index.js │ │ └── lastName.js │ └── phone │ │ └── index.js │ ├── ru-RU │ ├── address │ │ ├── countryWithCodes.js │ │ ├── index.js │ │ ├── state.js │ │ └── streetTitle.js │ ├── build.js │ ├── company │ │ └── index.js │ ├── index.js │ ├── internet │ │ └── index.js │ ├── names │ │ ├── firstNameFemale.js │ │ ├── firstNameMale.js │ │ ├── index.js │ │ ├── lastNameFemale.js │ │ ├── lastNameMale.js │ │ ├── middleNameFemale.js │ │ └── middleNameMale.js │ └── phone │ │ └── index.js │ ├── sk-SK │ ├── address │ │ ├── city.js │ │ ├── countryWithCodes.js │ │ ├── index.js │ │ └── streetName.js │ ├── build.js │ ├── company │ │ └── index.js │ ├── index.js │ ├── internet │ │ └── index.js │ ├── names │ │ ├── firstNameF.js │ │ ├── firstNameM.js │ │ ├── index.js │ │ ├── lastNameF.js │ │ └── lastNameM.js │ └── phone │ │ └── index.js │ └── sv-SE │ ├── address │ ├── countryWithCodes.js │ └── index.js │ ├── build.js │ ├── company │ └── index.js │ ├── index.js │ ├── internet │ └── index.js │ ├── names │ ├── firstNameF.js │ ├── firstNameM.js │ ├── index.js │ └── lastName.js │ └── phone │ └── index.js ├── package-lock.json ├── package.json ├── test ├── index.js ├── karma.conf.js └── specs │ ├── index.spec.js │ ├── locales │ ├── cs-CZ │ │ └── index.spec.js │ ├── de-DE │ │ └── index.spec.js │ ├── default │ │ ├── address.spec.js │ │ ├── company.spec.js │ │ ├── date.spec.js │ │ ├── entity.spec.js │ │ ├── index.spec.js │ │ ├── internet.spec.js │ │ ├── lorem.spec.js │ │ ├── misc.spec.js │ │ ├── names.spec.js │ │ └── phone.spec.js │ ├── en-AU │ │ └── index.spec.js │ ├── en-CA │ │ └── index.spec.js │ ├── es-ES │ │ └── index.spec.js │ ├── fr-FR │ │ └── index.spec.js │ ├── hu-HU │ │ └── index.spec.js │ ├── it-IT │ │ └── index.spec.js │ ├── nb-NO │ │ └── index.spec.js │ ├── pl-PL │ │ └── index.spec.js │ ├── pt-BR │ │ └── index.spec.js │ ├── ru-RU │ │ └── index.spec.js │ ├── sk-SK │ │ └── index.spec.js │ └── sv-SE │ │ └── index.spec.js │ ├── others.spec.js │ ├── populate.spec.js │ ├── random.spec.js │ ├── seed.spec.js │ └── times.spec.js └── vendor ├── mersenne.js └── password-generator.js /.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": ["es2015", "stage-0"], 3 | "comments": false 4 | } -------------------------------------------------------------------------------- /.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | root: true, 3 | "env": { 4 | "browser": true, 5 | "commonjs": true, 6 | "es6": true, 7 | "jquery": true, 8 | "mocha": true 9 | }, 10 | "extends": "eslint:recommended", 11 | "parserOptions": { 12 | "sourceType": "module" 13 | }, 14 | "rules": { 15 | "indent": [ 16 | "warn", 17 | "tab" 18 | ], 19 | "quotes": [ 20 | "warn", 21 | "double" 22 | ], 23 | "semi": [ 24 | "error", 25 | "always" 26 | ], 27 | "no-var": [ 28 | "error" 29 | ], 30 | "no-console": [ 31 | "off" 32 | ], 33 | "no-unused-vars": [ 34 | "warn" 35 | ] 36 | } 37 | }; -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | 6 | # Runtime data 7 | pids 8 | *.pid 9 | *.seed 10 | 11 | # Directory for instrumented libs generated by jscoverage/JSCover 12 | lib-cov 13 | 14 | # Coverage directory used by tools like istanbul 15 | coverage 16 | 17 | # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) 18 | .grunt 19 | 20 | # node-waf configuration 21 | .lock-wscript 22 | 23 | # Compiled binary addons (http://nodejs.org/api/addons.html) 24 | build/Release 25 | 26 | # Dependency directory 27 | node_modules 28 | 29 | # Optional npm cache directory 30 | .npm 31 | 32 | # Optional REPL history 33 | .node_repl_history 34 | -------------------------------------------------------------------------------- /.npmignore: -------------------------------------------------------------------------------- 1 | demo/ 2 | test/ -------------------------------------------------------------------------------- /.publishrc: -------------------------------------------------------------------------------- 1 | { 2 | "validations": { 3 | "vulnerableDependencies": true, 4 | "uncommittedChanges": true, 5 | "untrackedFiles": false, 6 | "sensitiveData": true, 7 | "branch": "master", 8 | "gitTag": true 9 | }, 10 | "confirm": true, 11 | "publishTag": "latest", 12 | "prePublishScript": "npm run build" 13 | } -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | cache: 3 | directories: 4 | - node_modules 5 | node_js: 6 | - "14" 7 | - "12" 8 | - "10" 9 | after_success: 10 | - npm run coverall 11 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2016 Icebob 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /LOCALES.md: -------------------------------------------------------------------------------- 1 | # How to add a locale 2 | 3 | 1. Create a subfolder in `lib/locales`. Please use 2 digit language codes and 2 digit country codes. E.g: `it-IT`, `fr-CA` 4 | Use codes from [here](http://www.lingoes.net/en/translator/langcode.htm) 5 | 6 | 2. Create an `index.js` and set metadata informations to `_meta` property. 7 | ```js 8 | module.exports = { 9 | _meta: { 10 | id: "fr-FR", // Locale code 11 | fallback: null, // Fallback locale code, if null, fallback will be the 'default' locale 12 | language: "French", // Language name 13 | country: "France", // Default country name 14 | countryCode: "FR" // Default country code 15 | }, 16 | 17 | names: require("./names"), 18 | phone: require("./phone"), 19 | address: require("./address"), 20 | company: require("./company"), 21 | internet: require("./internet") 22 | }; 23 | ``` 24 | 25 | 3. Copy an existing locale files to your new locale directory 26 | 4. Override or add your locale data to files 27 | 5. Cover your locale with test: [example](https://github.com/icebob/fakerator/blob/master/test/specs/locales/fr-FR/index.spec.js). Use `npm run ci` under development. 28 | 6. Run `npm test` 29 | 7. If every test passed, create a [PR](https://github.com/icebob/fakerator/pulls) with the new locale 30 | -------------------------------------------------------------------------------- /bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "fakerator", 3 | "description": "Random data generator with localization", 4 | "main": "dist/fakerator.js", 5 | "authors": [ 6 | "Icebob" 7 | ], 8 | "license": "MIT", 9 | "keywords": [ 10 | "fake", 11 | "contextual", 12 | "casual", 13 | "random", 14 | "generator", 15 | "mocks", 16 | "test" 17 | ], 18 | "homepage": "https://github.com/icebob/fakerator", 19 | "ignore": [ 20 | "**/.*", 21 | "node_modules", 22 | "bower_components", 23 | "test", 24 | "tests" 25 | ] 26 | } 27 | -------------------------------------------------------------------------------- /config/webpack.base.config.js: -------------------------------------------------------------------------------- 1 | var path = require("path"); 2 | var webpack = require("webpack"); 3 | var sourceDir = path.resolve("lib"); 4 | 5 | var version = require("../package.json").version; 6 | var banner = "/**\n" + " * fakerator v" + version + "\n" + " * https://github.com/icebob/fakerator\n" + " * Released under the MIT License.\n" + " */\n"; 7 | 8 | module.exports = { 9 | entry: path.resolve('lib', 'index.js'), 10 | output: { 11 | path: path.resolve('dist'), 12 | filename: "fakerator.js", 13 | library: "Fakerator", 14 | libraryTarget: "umd" 15 | }, 16 | 17 | plugins: [ 18 | new webpack.optimize.DedupePlugin(), 19 | new webpack.DefinePlugin({ 20 | 'process.env' : { 21 | NODE_ENV : JSON.stringify('production') 22 | } 23 | }), 24 | new webpack.BannerPlugin(banner, { 25 | raw: true 26 | }) 27 | ], 28 | 29 | resolve: { 30 | alias: { 31 | 'lib': sourceDir, 32 | 'vendor': path.resolve("vendor"), 33 | 'locales': path.join(sourceDir, "locales") 34 | } 35 | }, 36 | 37 | 38 | module: { 39 | loaders: [ 40 | { 41 | "test": /\.js?$/, 42 | "exclude": /node_modules/, 43 | "loader": "babel" 44 | } 45 | ] 46 | } 47 | }; -------------------------------------------------------------------------------- /config/webpack.build.config.js: -------------------------------------------------------------------------------- 1 | var webpack = require("webpack"); 2 | var path = require("path"); 3 | var del = require("del"); 4 | var fs = require("fs"); 5 | var glob = require("glob"); 6 | 7 | var merge = require("webpack-merge"); 8 | var wpBaseConfig = require("./webpack.base.config"); 9 | 10 | 11 | 12 | module.exports = [ 13 | wpBaseConfig, 14 | merge(wpBaseConfig, { 15 | output: { 16 | path: "./dist", 17 | filename: "fakerator.min.js", 18 | library: "Fakerator", 19 | libraryTarget: "umd" 20 | }, 21 | plugins: [ 22 | new webpack.optimize.UglifyJsPlugin({ 23 | compress: { 24 | warnings: false 25 | } 26 | }) 27 | ] 28 | })/*, 29 | merge(wpBaseConfig, { 30 | entry: path.resolve('lib', 'locales', 'locale-build.js'), 31 | output: { 32 | path: "./dist/locales", 33 | filename: "hu-HU.js", 34 | library: "Fakerator", 35 | libraryTarget: "umd" 36 | } 37 | })*/ 38 | ]; 39 | 40 | del.sync(["./dist/**"]); 41 | 42 | 43 | (function() { 44 | var localeDirs = glob.sync("./lib/locales/*/"); 45 | 46 | //console.log("asd", localeDirs); 47 | 48 | var wrapper = fs.readFileSync(path.join(".", "lib", "locales", "locale-build.js")).toString(); 49 | 50 | localeDirs.forEach(function(dir) { 51 | 52 | if (fs.existsSync(path.join(dir, "index.js"))) { 53 | //var locale = require(path.join("..", dir, "index")); 54 | var localeID = dir.split("/")[3]; 55 | var fallbackID = "default"; 56 | 57 | //console.log(localeID); 58 | var fName = path.join(dir, "build.js"); 59 | 60 | var content = wrapper.replace("%%LOCALEID%%", localeID).replace("%%FALLBACKID%%", fallbackID); 61 | 62 | fs.writeFileSync(fName, content); 63 | } 64 | }); 65 | 66 | })(); 67 | 68 | var buildFiles = glob.sync("./lib/locales/**/build.js"); 69 | 70 | //console.log(buildFiles); 71 | 72 | buildFiles.forEach(function(localeFile) { 73 | 74 | var localeID = localeFile.split("/")[3]; 75 | //console.log(localeFile, localeID); 76 | 77 | module.exports.push(merge(wpBaseConfig, { 78 | entry: localeFile, 79 | output: { 80 | path: "./dist/locales", 81 | filename: localeID + ".js", 82 | library: "Fakerator", 83 | libraryTarget: "umd" 84 | } 85 | })); 86 | 87 | module.exports.push(merge(wpBaseConfig, { 88 | entry: localeFile, 89 | output: { 90 | path: "./dist/locales", 91 | filename: localeID + ".min.js", 92 | library: "Fakerator", 93 | libraryTarget: "umd" 94 | }, 95 | plugins: [ 96 | new webpack.optimize.UglifyJsPlugin({ 97 | compress: { 98 | warnings: false 99 | } 100 | }) 101 | ] 102 | })); 103 | 104 | }); 105 | 106 | -------------------------------------------------------------------------------- /config/webpack.test.config.js: -------------------------------------------------------------------------------- 1 | var webpack = require("webpack"); 2 | var path = require("path"); 3 | var version = require("../package.json").version; 4 | 5 | var merge = require("webpack-merge"); 6 | var wpBaseConfig = require("./webpack.base.config"); 7 | 8 | module.exports = merge(wpBaseConfig, { 9 | devtool: '#inline-source-map', 10 | module: { 11 | preLoaders: [ 12 | { 13 | test: /\.js$/, 14 | include: path.resolve('lib'), 15 | loader: 'babel-istanbul', 16 | query: { 17 | cacheDirectory: true 18 | } 19 | } 20 | ] 21 | } 22 | 23 | }); 24 | 25 | delete module.exports.entry; 26 | delete module.exports.output; 27 | -------------------------------------------------------------------------------- /lib/index.js: -------------------------------------------------------------------------------- 1 | import isNil from "lodash/isNil"; 2 | import isArray from "lodash/isArray"; 3 | import isFunction from "lodash/isFunction"; 4 | import isObject from "lodash/isObject"; 5 | import mergeWith from "lodash/mergeWith"; 6 | 7 | import Fakerator from "./fakerator"; 8 | 9 | module.exports = function(localeID = "default") { 10 | let locale; 11 | try { 12 | locale = require("./locales/" + localeID + "/index"); 13 | } catch (e) { 14 | // ignored 15 | } 16 | 17 | if (locale) { 18 | if (localeID != "default") { 19 | let fallbackID = locale._meta.fallback || "default"; 20 | let fbLocale = require("./locales/" + fallbackID + "/index"); 21 | if (fbLocale) { 22 | // Merge locale and fallback 23 | locale = mergeWith(locale, fbLocale, (objValue) => { 24 | // DON'T MERGE ARRAYS 25 | if (isArray(objValue) || isFunction(objValue)) 26 | return objValue; 27 | 28 | if (!isNil(objValue) && !isObject(objValue)) 29 | return objValue; 30 | }); 31 | } 32 | } 33 | } else { 34 | locale = require("./locales/default/index"); 35 | } 36 | 37 | return new Fakerator(locale); 38 | }; -------------------------------------------------------------------------------- /lib/locales/cs-CZ/address/index.js: -------------------------------------------------------------------------------- 1 | import countries from "./countryWithCodes"; 2 | 3 | module.exports = { 4 | countryAndCode() { 5 | let country = this.random.objectElement(countries); 6 | return { 7 | code: Object.keys(country)[0], 8 | name: country[Object.keys(country)[0]] 9 | }; 10 | }, 11 | 12 | state: [ 13 | ], 14 | 15 | stateAbbr: [ 16 | ], 17 | 18 | city: require("./city"), 19 | 20 | street: [ 21 | "#{address.streetName} #{address.buildingNumber}" 22 | ], 23 | 24 | streetName: require("./streetName"), 25 | 26 | buildingNumber: [ 27 | "#", 28 | "##", 29 | "###" 30 | ], 31 | 32 | postCode: [ 33 | "#####", 34 | "### ##", 35 | "###-##" 36 | ] 37 | 38 | }; -------------------------------------------------------------------------------- /lib/locales/cs-CZ/build.js: -------------------------------------------------------------------------------- 1 | import isNil from "lodash/isNil"; 2 | import isArray from "lodash/isArray"; 3 | import isFunction from "lodash/isFunction"; 4 | import isObject from "lodash/isObject"; 5 | import mergeWith from "lodash/mergeWith"; 6 | 7 | import Fakerator from "lib/fakerator"; 8 | 9 | module.exports = function() { 10 | let locale = require("lib/locales/cs-CZ"); 11 | let fbLocale = require("lib/locales/default"); 12 | 13 | // Merge locale and fallback 14 | locale = mergeWith(locale, fbLocale, (objValue) => { 15 | // DON'T MERGE ARRAYS 16 | if (isArray(objValue) || isFunction(objValue)) 17 | return objValue; 18 | 19 | if (!isNil(objValue) && !isObject(objValue)) 20 | return objValue; 21 | }); 22 | 23 | return new Fakerator(locale); 24 | }; -------------------------------------------------------------------------------- /lib/locales/cs-CZ/company/index.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | name: [ 3 | "#{names.lastName} #{company.suffix}", 4 | "#{names.lastName} #{company.suffix}", 5 | "#{names.lastName} a #{names.lastName} #{company.suffix}" 6 | ], 7 | 8 | suffix: [ 9 | "s.r.o.", 10 | "a.s.", 11 | "v.o.s." 12 | ] 13 | }; -------------------------------------------------------------------------------- /lib/locales/cs-CZ/index.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | _meta: { 3 | id: "cs-CZ", 4 | fallback: null, 5 | language: "Czech", 6 | country: "Česká republika", 7 | countryCode: "CZ" 8 | }, 9 | 10 | names: require("./names"), 11 | phone: require("./phone"), 12 | address: require("./address"), 13 | company: require("./company"), 14 | internet: require("./internet") 15 | }; -------------------------------------------------------------------------------- /lib/locales/cs-CZ/internet/index.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | tld: [ 3 | "cz", 4 | "com", 5 | "net", 6 | "eu", 7 | "org" 8 | ], 9 | 10 | emailDomain: [ 11 | "gmail.com", 12 | "seznam.cz", 13 | "centrum.cz", 14 | "volny.cz", 15 | "atlas.cz" 16 | ] 17 | 18 | }; -------------------------------------------------------------------------------- /lib/locales/cs-CZ/names/index.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | // Male first name 3 | firstNameM: require("./firstNameM"), 4 | 5 | // Femail first name 6 | firstNameF: require("./firstNameF"), 7 | 8 | // Male last name 9 | lastNameM: require("./lastNameM"), 10 | 11 | // Female last name 12 | lastNameF: require("./lastNameF"), 13 | 14 | prefix: [ 15 | "Ing.", 16 | "Mgr.", 17 | "JUDr.", 18 | "MUDr." 19 | ], 20 | 21 | suffix: [ 22 | "Phd." 23 | ], 24 | 25 | nameM: [ 26 | "#{names.prefix} #{names.firstNameM} #{names.lastNameM}", 27 | "#{names.firstNameM} #{names.lastNameM} #{names.suffix}", 28 | "#{names.firstNameM} #{names.lastNameM}", 29 | "#{names.firstNameM} #{names.lastNameM}", 30 | "#{names.firstNameM} #{names.lastNameM}" 31 | ], 32 | 33 | nameF: [ 34 | "#{names.prefix} #{names.firstNameF} #{names.lastNameF}", 35 | "#{names.firstNameF} #{names.lastNameF} #{names.suffix}", 36 | "#{names.firstNameF} #{names.lastNameF}", 37 | "#{names.firstNameF} #{names.lastNameF}", 38 | "#{names.firstNameF} #{names.lastNameF}" 39 | ] 40 | 41 | }; -------------------------------------------------------------------------------- /lib/locales/cs-CZ/phone/index.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | number: [ 3 | "601 ### ###", 4 | "737 ### ###", 5 | "736 ### ###", 6 | "### ### ###", 7 | "+420 ### ### ###", 8 | "00420 ### ### ###" 9 | ] 10 | }; -------------------------------------------------------------------------------- /lib/locales/de-DE/address/index.js: -------------------------------------------------------------------------------- 1 | import countries from "./countryWithCodes"; 2 | 3 | module.exports = { 4 | countryAndCode() { 5 | let country = this.random.objectElement(countries); 6 | return { 7 | code: Object.keys(country)[0], 8 | name: country[Object.keys(country)[0]] 9 | }; 10 | }, 11 | 12 | state: [ 13 | "Baden-Württemberg", 14 | "Bayern", 15 | "Berlin", 16 | "Brandenburg", 17 | "Bremen", 18 | "Hamburg", 19 | "Hessen", 20 | "Mecklenburg-Vorpommern", 21 | "Niedersachsen", 22 | "Nordrhein-Westfalen", 23 | "Rheinland-Pfalz", 24 | "Saarland", 25 | "Sachsen", 26 | "Sachsen-Anhalt", 27 | "Schleswig-Holstein", 28 | "Thüringen" 29 | ], 30 | stateAbbr: [ 31 | "BW", 32 | "BY", 33 | "BE", 34 | "BB", 35 | "HB", 36 | "HH", 37 | "HE", 38 | "MV", 39 | "NI", 40 | "NW", 41 | "RP", 42 | "SL", 43 | "SN", 44 | "ST", 45 | "SH", 46 | "TH" 47 | ], 48 | 49 | city: [ 50 | "#{address.cityPrefix} #{names.firstName}#{address.citySuffix}", 51 | "#{address.cityPrefix} #{names.firstName}", 52 | "#{names.firstName}#{address.citySuffix}", 53 | "#{names.lastName}#{address.citySuffix}" 54 | ], 55 | 56 | cityPrefix: [ 57 | "Nord", 58 | "Ost", 59 | "West", 60 | "Süd", 61 | "Neu", 62 | "Alt", 63 | "Bad" 64 | ], 65 | 66 | citySuffix: [ 67 | "stadt", 68 | "dorf", 69 | "land", 70 | "scheid", 71 | "burg" 72 | ], 73 | 74 | street: [ 75 | "#{address.streetName} #{address.buildingNumber}" 76 | ], 77 | 78 | streetName: require("./streetName"), 79 | 80 | streetSuffix: [], 81 | 82 | buildingNumber: [ 83 | "###", 84 | "##", 85 | "#", 86 | "##a", 87 | "##b", 88 | "##c" 89 | ], 90 | 91 | postCode: [ 92 | "#####" 93 | ] 94 | 95 | }; -------------------------------------------------------------------------------- /lib/locales/de-DE/build.js: -------------------------------------------------------------------------------- 1 | import isNil from "lodash/isNil"; 2 | import isArray from "lodash/isArray"; 3 | import isFunction from "lodash/isFunction"; 4 | import isObject from "lodash/isObject"; 5 | import mergeWith from "lodash/mergeWith"; 6 | 7 | import Fakerator from "lib/fakerator"; 8 | 9 | module.exports = function() { 10 | let locale = require("lib/locales/de-DE"); 11 | let fbLocale = require("lib/locales/default"); 12 | 13 | // Merge locale and fallback 14 | locale = mergeWith(locale, fbLocale, (objValue) => { 15 | // DON'T MERGE ARRAYS 16 | if (isArray(objValue) || isFunction(objValue)) 17 | return objValue; 18 | 19 | if (!isNil(objValue) && !isObject(objValue)) 20 | return objValue; 21 | }); 22 | 23 | return new Fakerator(locale); 24 | }; -------------------------------------------------------------------------------- /lib/locales/de-DE/company/index.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | name: [ 3 | "#{names.lastName} #{company.suffix}", 4 | "#{names.lastName}-#{names.lastName}", 5 | "#{names.lastName}, #{names.lastName} und #{names.lastName}" 6 | ], 7 | 8 | suffix: [ 9 | "GmbH", 10 | "AG", 11 | "Gruppe", 12 | "KG", 13 | "GmbH & Co. KG", 14 | "UG", 15 | "OHG" 16 | ] 17 | }; -------------------------------------------------------------------------------- /lib/locales/de-DE/index.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | _meta: { 3 | id: "de-DE", 4 | fallback: null, 5 | language: "German", 6 | country: "Germany", 7 | countryCode: "DE" 8 | }, 9 | 10 | names: require("./names"), 11 | phone: require("./phone"), 12 | address: require("./address"), 13 | company: require("./company"), 14 | internet: require("./internet") 15 | }; -------------------------------------------------------------------------------- /lib/locales/de-DE/internet/index.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | tld: [ 3 | "com", 4 | "info", 5 | "name", 6 | "net", 7 | "org", 8 | "de", 9 | "ch" 10 | ], 11 | 12 | emailDomain: [ 13 | "gmail.com", 14 | "yahoo.com", 15 | "hotmail.com" 16 | ] 17 | 18 | }; -------------------------------------------------------------------------------- /lib/locales/de-DE/names/index.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | // Male first name 3 | firstNameM: require("./firstName"), 4 | 5 | // Femail first name 6 | firstNameF: require("./firstName"), 7 | 8 | // Male last name 9 | lastNameM: require("./lastName"), 10 | 11 | // Female last name 12 | lastNameF: require("./lastName"), 13 | 14 | prefix: [ 15 | "Hr.", 16 | "Fr.", 17 | "Dr.", 18 | "Prof. Dr." 19 | ], 20 | 21 | nobilityTitlePrefix: require("./nobilityTitlePrefix"), 22 | 23 | suffix: [], 24 | 25 | name: [ 26 | "#{names.prefix} #{names.firstName} #{names.lastName}", 27 | "#{names.firstName} #{names.nobilityTitlePrefix} #{names.lastName}", 28 | "#{names.firstName} #{names.lastName}", 29 | "#{names.firstName} #{names.lastName}", 30 | "#{names.firstName} #{names.lastName}", 31 | "#{names.firstName} #{names.lastName}" 32 | ], 33 | 34 | nameM: module.exports.name, 35 | nameF: module.exports.name 36 | 37 | }; -------------------------------------------------------------------------------- /lib/locales/de-DE/names/nobilityTitlePrefix.js: -------------------------------------------------------------------------------- 1 | module.exports = [ 2 | "zu", 3 | "von", 4 | "vom", 5 | "von der" 6 | ]; 7 | -------------------------------------------------------------------------------- /lib/locales/de-DE/phone/index.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | number: [ 3 | "(0###) #########", 4 | "(0####) #######", 5 | "+49-###-#######", 6 | "+49-####-########" 7 | ] 8 | }; -------------------------------------------------------------------------------- /lib/locales/default/address/geoLocationNearBy.js: -------------------------------------------------------------------------------- 1 | module.exports = function(coordinate, radius = 10.0, isMetric = true) { 2 | 3 | function degreesToRadians(degrees) { 4 | return degrees * (Math.PI / 180.0); 5 | } 6 | 7 | function radiansToDegrees(radians) { 8 | return radians * (180.0 / Math.PI); 9 | } 10 | 11 | function milesToKm(miles) { 12 | return miles * 0.621371; 13 | } 14 | 15 | function coordinateWithOffset(coordinate, bearing, distance, isMetric) { 16 | const R = 6378.137; // Radius of the Earth (http://nssdc.gsfc.nasa.gov/planetary/factsheet/earthfact.html) 17 | const d = isMetric ? distance : milesToKm(distance); // Distance in km 18 | 19 | let lat1 = degreesToRadians(coordinate.latitude); //Current lat point converted to radians 20 | let lon1 = degreesToRadians(coordinate.longitude); //Current long point converted to radians 21 | 22 | let lat2 = Math.asin(Math.sin(lat1) * Math.cos(d / R) + Math.cos(lat1) * Math.sin(d / R) * Math.cos(bearing)); 23 | 24 | let lon2 = lon1 + Math.atan2( 25 | Math.sin(bearing) * Math.sin(d / R) * Math.cos(lat1), 26 | Math.cos(d / R) - Math.sin(lat1) * Math.sin(lat2)); 27 | 28 | // Keep longitude in range [-180, 180] 29 | if (lon2 > degreesToRadians(180)) { 30 | lon2 = lon2 - degreesToRadians(360); 31 | } else if (lon2 < degreesToRadians(-180)) { 32 | lon2 = lon2 + degreesToRadians(360); 33 | } 34 | 35 | return [radiansToDegrees(lat2), radiansToDegrees(lon2)]; 36 | } 37 | 38 | // If there is no coordinate, the best we can do is return a random GPS coordinate. 39 | if (coordinate === undefined) { 40 | return this.address.geoLocation(); 41 | } 42 | 43 | // TODO: implement either a gaussian/uniform distribution of points in cicular region. 44 | // Possibly include param to function that allows user to choose between distributions. 45 | 46 | // This approach will likely result in a higher density of points near the center. 47 | let randomCoord = coordinateWithOffset(coordinate, degreesToRadians(this.random.number(360)), radius, isMetric); 48 | 49 | return { 50 | latitude: randomCoord[0], 51 | longitude: randomCoord[1] 52 | }; 53 | 54 | }; -------------------------------------------------------------------------------- /lib/locales/default/address/index.js: -------------------------------------------------------------------------------- 1 | import countries from "./countryWithCodes"; 2 | 3 | module.exports = { 4 | countryAndCode() { 5 | let country = this.random.objectElement(countries); 6 | return { 7 | code: Object.keys(country)[0], 8 | name: country[Object.keys(country)[0]] 9 | }; 10 | }, 11 | 12 | country() { 13 | return this.address.countryAndCode().name; 14 | }, 15 | 16 | countryCode() { 17 | return this.address.countryAndCode().code; 18 | }, 19 | 20 | state: require("./state"), 21 | 22 | stateAbbr: require("./stateAbbr"), 23 | 24 | city: [ 25 | "#{address.cityPrefix} #{names.firstName}#{address.citySuffix}", 26 | "#{address.cityPrefix} #{names.firstName}", 27 | "#{names.firstName}#{address.citySuffix}", 28 | "#{names.lastName}#{address.citySuffix}" 29 | ], 30 | 31 | cityPrefix: [ 32 | "North", 33 | "East", 34 | "West", 35 | "South", 36 | "New", 37 | "Lake", 38 | "Port" 39 | ], 40 | 41 | citySuffix: [ 42 | "town", 43 | "ton", 44 | "land", 45 | "ville", 46 | "berg", 47 | "burgh", 48 | "borough", 49 | "bury", 50 | "view", 51 | "port", 52 | "mouth", 53 | "stad", 54 | "furt", 55 | "chester", 56 | "mouth", 57 | "fort", 58 | "haven", 59 | "side", 60 | "shire" 61 | ], 62 | 63 | street: [ 64 | "#{address.buildingNumber} #{address.streetName}", 65 | "#{address.buildingNumber} #{address.streetName}", 66 | "#{address.buildingNumber} #{address.streetName} Apt. ###", 67 | "#{address.buildingNumber} #{address.streetName} Suite ###" 68 | ], 69 | 70 | streetName: [ 71 | "#{names.firstName} #{address.streetSuffix}", 72 | "#{names.lastName} #{address.streetSuffix}" 73 | ], 74 | 75 | streetSuffix: require("./streetSuffix"), 76 | 77 | buildingNumber: [ 78 | "#####", 79 | "####", 80 | "###" 81 | ], 82 | 83 | postCode: [ 84 | "#####", 85 | "#####-####" 86 | ], 87 | 88 | geoLocation() { 89 | return { 90 | latitude: (this.random.number(180 * 10000) / 10000.0 - 90.0), 91 | longitude: (this.random.number(360 * 10000) / 10000.0 - 180.0) 92 | }; 93 | }, 94 | 95 | altitude(opts = {}) { 96 | return this.random.number(opts.min || 0, opts.max || 8848); 97 | }, 98 | 99 | geoLocationNearBy: require("./geoLocationNearBy") 100 | }; -------------------------------------------------------------------------------- /lib/locales/default/address/state.js: -------------------------------------------------------------------------------- 1 | module["exports"] = [ 2 | "Alabama", 3 | "Alaska", 4 | "Arizona", 5 | "Arkansas", 6 | "California", 7 | "Colorado", 8 | "Connecticut", 9 | "Delaware", 10 | "Florida", 11 | "Georgia", 12 | "Hawaii", 13 | "Idaho", 14 | "Illinois", 15 | "Indiana", 16 | "Iowa", 17 | "Kansas", 18 | "Kentucky", 19 | "Louisiana", 20 | "Maine", 21 | "Maryland", 22 | "Massachusetts", 23 | "Michigan", 24 | "Minnesota", 25 | "Mississippi", 26 | "Missouri", 27 | "Montana", 28 | "Nebraska", 29 | "Nevada", 30 | "New Hampshire", 31 | "New Jersey", 32 | "New Mexico", 33 | "New York", 34 | "North Carolina", 35 | "North Dakota", 36 | "Ohio", 37 | "Oklahoma", 38 | "Oregon", 39 | "Pennsylvania", 40 | "Rhode Island", 41 | "South Carolina", 42 | "South Dakota", 43 | "Tennessee", 44 | "Texas", 45 | "Utah", 46 | "Vermont", 47 | "Virginia", 48 | "Washington", 49 | "West Virginia", 50 | "Wisconsin", 51 | "Wyoming" 52 | ]; 53 | -------------------------------------------------------------------------------- /lib/locales/default/address/stateAbbr.js: -------------------------------------------------------------------------------- 1 | module["exports"] = [ 2 | "AL", 3 | "AK", 4 | "AZ", 5 | "AR", 6 | "CA", 7 | "CO", 8 | "CT", 9 | "DE", 10 | "FL", 11 | "GA", 12 | "HI", 13 | "ID", 14 | "IL", 15 | "IN", 16 | "IA", 17 | "KS", 18 | "KY", 19 | "LA", 20 | "ME", 21 | "MD", 22 | "MA", 23 | "MI", 24 | "MN", 25 | "MS", 26 | "MO", 27 | "MT", 28 | "NE", 29 | "NV", 30 | "NH", 31 | "NJ", 32 | "NM", 33 | "NY", 34 | "NC", 35 | "ND", 36 | "OH", 37 | "OK", 38 | "OR", 39 | "PA", 40 | "RI", 41 | "SC", 42 | "SD", 43 | "TN", 44 | "TX", 45 | "UT", 46 | "VT", 47 | "VA", 48 | "WA", 49 | "WV", 50 | "WI", 51 | "WY" 52 | ]; 53 | -------------------------------------------------------------------------------- /lib/locales/default/address/streetSuffix.js: -------------------------------------------------------------------------------- 1 | module["exports"] = [ 2 | "Alley", 3 | "Avenue", 4 | "Branch", 5 | "Bridge", 6 | "Brook", 7 | "Brooks", 8 | "Burg", 9 | "Burgs", 10 | "Bypass", 11 | "Camp", 12 | "Canyon", 13 | "Cape", 14 | "Causeway", 15 | "Center", 16 | "Centers", 17 | "Circle", 18 | "Circles", 19 | "Cliff", 20 | "Cliffs", 21 | "Club", 22 | "Common", 23 | "Corner", 24 | "Corners", 25 | "Course", 26 | "Court", 27 | "Courts", 28 | "Cove", 29 | "Coves", 30 | "Creek", 31 | "Crescent", 32 | "Crest", 33 | "Crossing", 34 | "Crossroad", 35 | "Curve", 36 | "Dale", 37 | "Dam", 38 | "Divide", 39 | "Drive", 40 | "Drive", 41 | "Drives", 42 | "Estate", 43 | "Estates", 44 | "Expressway", 45 | "Extension", 46 | "Extensions", 47 | "Fall", 48 | "Falls", 49 | "Ferry", 50 | "Field", 51 | "Fields", 52 | "Flat", 53 | "Flats", 54 | "Ford", 55 | "Fords", 56 | "Forest", 57 | "Forge", 58 | "Forges", 59 | "Fork", 60 | "Forks", 61 | "Fort", 62 | "Freeway", 63 | "Garden", 64 | "Gardens", 65 | "Gateway", 66 | "Glen", 67 | "Glens", 68 | "Green", 69 | "Greens", 70 | "Grove", 71 | "Groves", 72 | "Harbor", 73 | "Harbors", 74 | "Haven", 75 | "Heights", 76 | "Highway", 77 | "Hill", 78 | "Hills", 79 | "Hollow", 80 | "Inlet", 81 | "Inlet", 82 | "Island", 83 | "Island", 84 | "Islands", 85 | "Islands", 86 | "Isle", 87 | "Isle", 88 | "Junction", 89 | "Junctions", 90 | "Key", 91 | "Keys", 92 | "Knoll", 93 | "Knolls", 94 | "Lake", 95 | "Lakes", 96 | "Land", 97 | "Landing", 98 | "Lane", 99 | "Light", 100 | "Lights", 101 | "Loaf", 102 | "Lock", 103 | "Locks", 104 | "Locks", 105 | "Lodge", 106 | "Lodge", 107 | "Loop", 108 | "Mall", 109 | "Manor", 110 | "Manors", 111 | "Meadow", 112 | "Meadows", 113 | "Mews", 114 | "Mill", 115 | "Mills", 116 | "Mission", 117 | "Mission", 118 | "Motorway", 119 | "Mount", 120 | "Mountain", 121 | "Mountain", 122 | "Mountains", 123 | "Mountains", 124 | "Neck", 125 | "Orchard", 126 | "Oval", 127 | "Overpass", 128 | "Park", 129 | "Parks", 130 | "Parkway", 131 | "Parkways", 132 | "Pass", 133 | "Passage", 134 | "Path", 135 | "Pike", 136 | "Pine", 137 | "Pines", 138 | "Place", 139 | "Plain", 140 | "Plains", 141 | "Plains", 142 | "Plaza", 143 | "Plaza", 144 | "Point", 145 | "Points", 146 | "Port", 147 | "Port", 148 | "Ports", 149 | "Ports", 150 | "Prairie", 151 | "Prairie", 152 | "Radial", 153 | "Ramp", 154 | "Ranch", 155 | "Rapid", 156 | "Rapids", 157 | "Rest", 158 | "Ridge", 159 | "Ridges", 160 | "River", 161 | "Road", 162 | "Road", 163 | "Roads", 164 | "Roads", 165 | "Route", 166 | "Row", 167 | "Rue", 168 | "Run", 169 | "Shoal", 170 | "Shoals", 171 | "Shore", 172 | "Shores", 173 | "Skyway", 174 | "Spring", 175 | "Springs", 176 | "Springs", 177 | "Spur", 178 | "Spurs", 179 | "Square", 180 | "Square", 181 | "Squares", 182 | "Squares", 183 | "Station", 184 | "Station", 185 | "Stravenue", 186 | "Stravenue", 187 | "Stream", 188 | "Stream", 189 | "Street", 190 | "Street", 191 | "Streets", 192 | "Summit", 193 | "Summit", 194 | "Terrace", 195 | "Throughway", 196 | "Trace", 197 | "Track", 198 | "Trafficway", 199 | "Trail", 200 | "Trail", 201 | "Tunnel", 202 | "Tunnel", 203 | "Turnpike", 204 | "Turnpike", 205 | "Underpass", 206 | "Union", 207 | "Unions", 208 | "Valley", 209 | "Valleys", 210 | "Via", 211 | "Viaduct", 212 | "View", 213 | "Views", 214 | "Village", 215 | "Village", 216 | "Villages", 217 | "Ville", 218 | "Vista", 219 | "Vista", 220 | "Walk", 221 | "Walks", 222 | "Wall", 223 | "Way", 224 | "Ways", 225 | "Well", 226 | "Wells" 227 | ]; 228 | -------------------------------------------------------------------------------- /lib/locales/default/build.js: -------------------------------------------------------------------------------- 1 | import isNil from "lodash/isNil"; 2 | import isArray from "lodash/isArray"; 3 | import isFunction from "lodash/isFunction"; 4 | import isObject from "lodash/isObject"; 5 | import mergeWith from "lodash/mergeWith"; 6 | 7 | import Fakerator from "lib/fakerator"; 8 | 9 | module.exports = function() { 10 | let locale = require("lib/locales/default"); 11 | let fbLocale = require("lib/locales/default"); 12 | 13 | // Merge locale and fallback 14 | locale = mergeWith(locale, fbLocale, (objValue) => { 15 | // DON'T MERGE ARRAYS 16 | if (isArray(objValue) || isFunction(objValue)) 17 | return objValue; 18 | 19 | if (!isNil(objValue) && !isObject(objValue)) 20 | return objValue; 21 | }); 22 | 23 | return new Fakerator(locale); 24 | }; -------------------------------------------------------------------------------- /lib/locales/default/company/index.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | name: [ 3 | "#{names.lastName} #{company.suffix}", 4 | "#{names.lastName}-#{names.lastName} #{company.suffix}", 5 | "#{names.lastName}, #{names.lastName} and #{names.lastName} #{company.suffix}" 6 | ], 7 | 8 | suffix: [ 9 | "Ltd.", 10 | "Inc.", 11 | "Corp.", 12 | "LLC", 13 | "Group" 14 | ] 15 | }; -------------------------------------------------------------------------------- /lib/locales/default/date/index.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | month: [ 3 | "January", 4 | "February", 5 | "March", 6 | "April", 7 | "May", 8 | "June", 9 | "July", 10 | "August", 11 | "September", 12 | "October", 13 | "November", 14 | "December" 15 | ], 16 | 17 | weekday: [ 18 | "Sunday", 19 | "Monday", 20 | "Tuesday", 21 | "Wednesday", 22 | "Thursday", 23 | "Friday", 24 | "Saturday" 25 | ], 26 | 27 | weekdayShort: [ 28 | "Sun", 29 | "Mon", 30 | "Tue", 31 | "Wed", 32 | "Thu", 33 | "Fri", 34 | "Sat" 35 | ], 36 | 37 | weekdayMin: [ 38 | "Su", 39 | "Mo", 40 | "Tu", 41 | "We", 42 | "Th", 43 | "Fr", 44 | "Sa" 45 | ], 46 | 47 | timezone: require("./timezone"), 48 | 49 | past(years = 1, refDate) { 50 | let date = refDate ? new Date(Date.parse(refDate)) : new Date(); 51 | let min = 1000; 52 | let max = years * 365 * 24 * 3600 * 1000; 53 | 54 | let past = date.getTime(); 55 | past -= this.random.number(min, max); // some time from now to N years ago, in milliseconds 56 | date.setTime(past); 57 | 58 | return date; 59 | }, 60 | 61 | future(years = 1, refDate) { 62 | let date = refDate ? new Date(Date.parse(refDate)) : new Date(); 63 | let min = 1000; 64 | let max = years * 365 * 24 * 3600 * 1000; 65 | 66 | let future = date.getTime(); 67 | future += this.random.number(min, max); // some time from now to N years ago, in milliseconds 68 | date.setTime(future); 69 | 70 | return date; 71 | }, 72 | 73 | between(from, to) { 74 | let fromMilli = Date.parse(from); 75 | let dateOffset = this.random.number(Date.parse(to) - fromMilli); 76 | 77 | let newDate = new Date(fromMilli + dateOffset); 78 | 79 | return newDate; 80 | }, 81 | 82 | recent(days = 1) { 83 | let date = new Date(); 84 | let min = 1000; 85 | let max = days * 24 * 3600 * 1000; 86 | 87 | let past = date.getTime(); 88 | past -= this.random.number(min, max); // some time from now to N days ago, in milliseconds 89 | date.setTime(past); 90 | 91 | return date; 92 | }, 93 | 94 | age(min = 18, max = 80) { 95 | return this.random.number(min, max); 96 | } 97 | }; -------------------------------------------------------------------------------- /lib/locales/default/date/timezone.js: -------------------------------------------------------------------------------- 1 | module["exports"] = [ 2 | "Pacific/Midway", 3 | "Pacific/Pago_Pago", 4 | "Pacific/Honolulu", 5 | "America/Juneau", 6 | "America/Los_Angeles", 7 | "America/Tijuana", 8 | "America/Denver", 9 | "America/Phoenix", 10 | "America/Chihuahua", 11 | "America/Mazatlan", 12 | "America/Chicago", 13 | "America/Regina", 14 | "America/Mexico_City", 15 | "America/Mexico_City", 16 | "America/Monterrey", 17 | "America/Guatemala", 18 | "America/New_York", 19 | "America/Indiana/Indianapolis", 20 | "America/Bogota", 21 | "America/Lima", 22 | "America/Lima", 23 | "America/Halifax", 24 | "America/Caracas", 25 | "America/La_Paz", 26 | "America/Santiago", 27 | "America/St_Johns", 28 | "America/Sao_Paulo", 29 | "America/Argentina/Buenos_Aires", 30 | "America/Guyana", 31 | "America/Godthab", 32 | "Atlantic/South_Georgia", 33 | "Atlantic/Azores", 34 | "Atlantic/Cape_Verde", 35 | "Europe/Dublin", 36 | "Europe/London", 37 | "Europe/Lisbon", 38 | "Europe/London", 39 | "Africa/Casablanca", 40 | "Africa/Monrovia", 41 | "Etc/UTC", 42 | "Europe/Belgrade", 43 | "Europe/Bratislava", 44 | "Europe/Budapest", 45 | "Europe/Ljubljana", 46 | "Europe/Prague", 47 | "Europe/Sarajevo", 48 | "Europe/Skopje", 49 | "Europe/Warsaw", 50 | "Europe/Zagreb", 51 | "Europe/Brussels", 52 | "Europe/Copenhagen", 53 | "Europe/Madrid", 54 | "Europe/Paris", 55 | "Europe/Amsterdam", 56 | "Europe/Berlin", 57 | "Europe/Berlin", 58 | "Europe/Rome", 59 | "Europe/Stockholm", 60 | "Europe/Vienna", 61 | "Africa/Algiers", 62 | "Europe/Bucharest", 63 | "Africa/Cairo", 64 | "Europe/Helsinki", 65 | "Europe/Kiev", 66 | "Europe/Riga", 67 | "Europe/Sofia", 68 | "Europe/Tallinn", 69 | "Europe/Vilnius", 70 | "Europe/Athens", 71 | "Europe/Istanbul", 72 | "Europe/Minsk", 73 | "Asia/Jerusalem", 74 | "Africa/Harare", 75 | "Africa/Johannesburg", 76 | "Europe/Moscow", 77 | "Europe/Moscow", 78 | "Europe/Moscow", 79 | "Asia/Kuwait", 80 | "Asia/Riyadh", 81 | "Africa/Nairobi", 82 | "Asia/Baghdad", 83 | "Asia/Tehran", 84 | "Asia/Muscat", 85 | "Asia/Muscat", 86 | "Asia/Baku", 87 | "Asia/Tbilisi", 88 | "Asia/Yerevan", 89 | "Asia/Kabul", 90 | "Asia/Yekaterinburg", 91 | "Asia/Karachi", 92 | "Asia/Karachi", 93 | "Asia/Tashkent", 94 | "Asia/Kolkata", 95 | "Asia/Kolkata", 96 | "Asia/Kolkata", 97 | "Asia/Kolkata", 98 | "Asia/Kathmandu", 99 | "Asia/Dhaka", 100 | "Asia/Dhaka", 101 | "Asia/Colombo", 102 | "Asia/Almaty", 103 | "Asia/Novosibirsk", 104 | "Asia/Rangoon", 105 | "Asia/Bangkok", 106 | "Asia/Bangkok", 107 | "Asia/Jakarta", 108 | "Asia/Krasnoyarsk", 109 | "Asia/Shanghai", 110 | "Asia/Chongqing", 111 | "Asia/Hong_Kong", 112 | "Asia/Urumqi", 113 | "Asia/Kuala_Lumpur", 114 | "Asia/Singapore", 115 | "Asia/Taipei", 116 | "Australia/Perth", 117 | "Asia/Irkutsk", 118 | "Asia/Ulaanbaatar", 119 | "Asia/Seoul", 120 | "Asia/Tokyo", 121 | "Asia/Tokyo", 122 | "Asia/Tokyo", 123 | "Asia/Yakutsk", 124 | "Australia/Darwin", 125 | "Australia/Adelaide", 126 | "Australia/Melbourne", 127 | "Australia/Melbourne", 128 | "Australia/Sydney", 129 | "Australia/Brisbane", 130 | "Australia/Hobart", 131 | "Asia/Vladivostok", 132 | "Pacific/Guam", 133 | "Pacific/Port_Moresby", 134 | "Asia/Magadan", 135 | "Asia/Magadan", 136 | "Pacific/Noumea", 137 | "Pacific/Fiji", 138 | "Asia/Kamchatka", 139 | "Pacific/Majuro", 140 | "Pacific/Auckland", 141 | "Pacific/Auckland", 142 | "Pacific/Tongatapu", 143 | "Pacific/Fakaofo", 144 | "Pacific/Apia" 145 | ]; 146 | -------------------------------------------------------------------------------- /lib/locales/default/entity/index.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | 3 | address(def = {}) { 4 | let country = this.address.countryAndCode(); 5 | return { 6 | country: def.country || country.name, 7 | countryCode: def.countryCode || country.code, 8 | state: def.state || this.address.state(), 9 | city: def.city || this.address.city(), 10 | street: def.street || this.address.street(), 11 | zip: def.zip || this.address.postCode(), 12 | geo: def.geo || this.address.geoLocation() 13 | }; 14 | }, 15 | 16 | user(gender) { 17 | 18 | let firstName = this.populate("#{names.firstName" + (gender ? gender.toUpperCase() : "") + "}"); 19 | let lastName = this.populate("#{names.lastName" + (gender ? gender.toUpperCase() : "") + "}"); 20 | 21 | return { 22 | firstName: firstName, 23 | lastName: lastName, 24 | gender: gender, 25 | userName: this.internet.userName(firstName, lastName), 26 | password: this.internet.password(), 27 | email: this.internet.email(firstName, lastName), 28 | phone: this.phone.number(), 29 | dob: this.date.past(80), 30 | website: this.internet.url(), 31 | ip: this.internet.ip(), 32 | avatar: this.internet.avatar(), 33 | gravatar: this.internet.gravatar(), 34 | address: this.entity.address(), 35 | status: this.random.boolean() 36 | }; 37 | 38 | }, 39 | 40 | company(name) { 41 | name = name || this.company.name(); 42 | 43 | return { 44 | name: name, 45 | email: this.internet.email(name), 46 | phone: this.phone.number(), 47 | website: this.internet.url(), 48 | ip: this.internet.ip(), 49 | address: this.entity.address() 50 | }; 51 | 52 | }, 53 | 54 | post(paragraphs = 3) { 55 | return { 56 | title: this.lorem.sentence(), 57 | keywords: this.utimes(this.lorem.word, 3), 58 | created: this.date.recent(7), 59 | content: this.times(this.lorem.paragraph, paragraphs).join("\r\n") 60 | }; 61 | } 62 | }; -------------------------------------------------------------------------------- /lib/locales/default/index.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | _meta: { 3 | id: "default", 4 | fallback: null, 5 | mask: "\#\{([A-Za-z0-9_\.]+)\}", 6 | language: "English", 7 | country: "United Kingdom", 8 | countryCode: "UK" 9 | }, 10 | 11 | names: require("./names"), 12 | phone: require("./phone"), 13 | address: require("./address"), 14 | company: require("./company"), 15 | internet: require("./internet"), 16 | lorem: require("./lorem"), 17 | date: require("./date"), 18 | misc: require("./misc"), 19 | entity: require("./entity") 20 | }; -------------------------------------------------------------------------------- /lib/locales/default/internet/tld.js: -------------------------------------------------------------------------------- 1 | module["exports"] = [ 2 | "com", 3 | "net", 4 | "org", 5 | "biz", 6 | "info", 7 | "eu", 8 | "co" 9 | ]; 10 | -------------------------------------------------------------------------------- /lib/locales/default/lorem/index.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | word: require("./word"), 3 | supplemental: require("./supplemental"), 4 | 5 | sentence() { 6 | let wordCount = this.random.number(3, 10); 7 | 8 | let words = []; 9 | for(wordCount; wordCount > 0; wordCount--) 10 | words.push(this.lorem.word()); 11 | 12 | return this.capitalize(words.join(" ")) + "."; 13 | }, 14 | 15 | paragraph() { 16 | let sentenceCount = this.random.number(3, 6); 17 | 18 | let sentences = []; 19 | for(sentenceCount; sentenceCount > 0; sentenceCount--) 20 | sentences.push(this.lorem.sentence()); 21 | 22 | return sentences.join(" "); 23 | } 24 | }; -------------------------------------------------------------------------------- /lib/locales/default/misc/index.js: -------------------------------------------------------------------------------- 1 | import uuid from "uuid"; 2 | 3 | module.exports = { 4 | uuid: uuid.v4 5 | }; -------------------------------------------------------------------------------- /lib/locales/default/names/index.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | // Male first name 3 | firstNameM: require("./firstNameMale"), 4 | 5 | // Femail first name 6 | firstNameF: require("./firstNameFemale"), 7 | 8 | // First name 9 | firstName: [ 10 | "#{names.firstNameM}", 11 | "#{names.firstNameF}" 12 | ], 13 | 14 | // Male last name 15 | lastNameM: require("./lastName"), 16 | 17 | // Female last name 18 | lastNameF: require("./lastName"), 19 | 20 | // Last name 21 | lastName: [ 22 | "#{names.lastNameM}", 23 | "#{names.lastNameF}" 24 | ], 25 | 26 | prefix: [ 27 | "Mr.", 28 | "Mrs.", 29 | "Ms.", 30 | "Miss", 31 | "Dr." 32 | ], 33 | 34 | suffix: [ 35 | "Jr.", 36 | "Sr.", 37 | "I", 38 | "II", 39 | "III", 40 | "IV", 41 | "V", 42 | "MD", 43 | "DDS", 44 | "PhD", 45 | "DVM" 46 | ], 47 | 48 | nameM: [ 49 | "#{names.prefix} #{names.firstNameM} #{names.lastNameM}", 50 | "#{names.firstNameM} #{names.lastNameM} #{names.suffix}", 51 | "#{names.firstNameM} #{names.lastNameM}", 52 | "#{names.firstNameM} #{names.lastNameM}", 53 | "#{names.firstNameM} #{names.lastNameM}", 54 | "#{names.firstNameM} #{names.lastNameM}" 55 | ], 56 | 57 | nameF: [ 58 | "#{names.prefix} #{names.firstNameF} #{names.lastNameF}", 59 | "#{names.firstNameF} #{names.lastNameF} #{names.suffix}", 60 | "#{names.firstNameF} #{names.lastNameF}", 61 | "#{names.firstNameF} #{names.lastNameF}", 62 | "#{names.firstNameF} #{names.lastNameF}", 63 | "#{names.firstNameF} #{names.lastNameF}" 64 | ], 65 | 66 | name: [ 67 | "#{names.nameM}", 68 | "#{names.nameF}" 69 | ] 70 | }; -------------------------------------------------------------------------------- /lib/locales/default/phone/index.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | number: [ 3 | "###-###-####", 4 | "(###) ###-####", 5 | "1-###-###-####", 6 | "###.###.####", 7 | "###-###-####", 8 | "(###) ###-####", 9 | "1-###-###-####", 10 | "###.###.####", 11 | "###-###-#### x###", 12 | "(###) ###-#### x###", 13 | "1-###-###-#### x###", 14 | "###.###.#### x###", 15 | "###-###-#### x####", 16 | "(###) ###-#### x####", 17 | "1-###-###-#### x####", 18 | "###.###.#### x####", 19 | "###-###-#### x#####", 20 | "(###) ###-#### x#####", 21 | "1-###-###-#### x#####", 22 | "###.###.#### x#####" 23 | ] 24 | }; -------------------------------------------------------------------------------- /lib/locales/en-AU/address/index.js: -------------------------------------------------------------------------------- 1 | import countries from "./countryWithCodes"; 2 | 3 | module.exports = { 4 | countryAndCode() { 5 | let country = this.random.objectElement(countries); 6 | return { 7 | code: Object.keys(country)[0], 8 | name: country[Object.keys(country)[0]] 9 | }; 10 | }, 11 | 12 | state: [ 13 | "New South Wales", 14 | "Queensland", 15 | "Northern Territory", 16 | "South Australia", 17 | "Western Australia", 18 | "Tasmania", 19 | "Australian Capital Territory", 20 | "Victoria" 21 | ], 22 | stateAbbr: [ 23 | "NSW", 24 | "QLD", 25 | "NT", 26 | "SA", 27 | "WA", 28 | "TAS", 29 | "ACT", 30 | "VIC" 31 | ], 32 | 33 | buildingNumber: [ 34 | "####", 35 | "###", 36 | "##" 37 | ], 38 | 39 | postCode: [ 40 | "0###", 41 | "2###", 42 | "3###", 43 | "4###", 44 | "5###", 45 | "6###", 46 | "7###" 47 | ] 48 | 49 | }; -------------------------------------------------------------------------------- /lib/locales/en-AU/address/streetSuffix.js: -------------------------------------------------------------------------------- 1 | module.exports = [ 2 | "Avenue", 3 | "Boulevard", 4 | "Circle", 5 | "Circuit", 6 | "Court", 7 | "Crescent", 8 | "Crest", 9 | "Drive", 10 | "Estate Dr", 11 | "Grove", 12 | "Hill", 13 | "Island", 14 | "Junction", 15 | "Knoll", 16 | "Lane", 17 | "Loop", 18 | "Mall", 19 | "Manor", 20 | "Meadow", 21 | "Mews", 22 | "Parade", 23 | "Parkway", 24 | "Pass", 25 | "Place", 26 | "Plaza", 27 | "Ridge", 28 | "Road", 29 | "Run", 30 | "Square", 31 | "Station St", 32 | "Street", 33 | "Summit", 34 | "Terrace", 35 | "Track", 36 | "Trail", 37 | "View Rd", 38 | "Way" 39 | ]; 40 | -------------------------------------------------------------------------------- /lib/locales/en-AU/build.js: -------------------------------------------------------------------------------- 1 | import isNil from "lodash/isNil"; 2 | import isArray from "lodash/isArray"; 3 | import isFunction from "lodash/isFunction"; 4 | import isObject from "lodash/isObject"; 5 | import mergeWith from "lodash/mergeWith"; 6 | 7 | import Fakerator from "lib/fakerator"; 8 | 9 | module.exports = function() { 10 | let locale = require("lib/locales/en-AU"); 11 | let fbLocale = require("lib/locales/default"); 12 | 13 | // Merge locale and fallback 14 | locale = mergeWith(locale, fbLocale, (objValue) => { 15 | // DON'T MERGE ARRAYS 16 | if (isArray(objValue) || isFunction(objValue)) 17 | return objValue; 18 | 19 | if (!isNil(objValue) && !isObject(objValue)) 20 | return objValue; 21 | }); 22 | 23 | return new Fakerator(locale); 24 | }; -------------------------------------------------------------------------------- /lib/locales/en-AU/company/index.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | 3 | suffix: [ 4 | "Pty Ltd", 5 | "and Sons", 6 | "Corp", 7 | "Group", 8 | "Brothers", 9 | "Partners" 10 | ] 11 | }; -------------------------------------------------------------------------------- /lib/locales/en-AU/index.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | _meta: { 3 | id: "en-AU", 4 | fallback: null, 5 | language: "English (Australia)", 6 | country: "Australia", 7 | countryCode: "AU" 8 | }, 9 | 10 | names: require("./names"), 11 | phone: require("./phone"), 12 | address: require("./address"), 13 | company: require("./company"), 14 | internet: require("./internet") 15 | }; -------------------------------------------------------------------------------- /lib/locales/en-AU/internet/index.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | tld: [ 3 | "com.au", 4 | "com", 5 | "net.au", 6 | "net", 7 | "org.au", 8 | "org" 9 | ] 10 | 11 | }; -------------------------------------------------------------------------------- /lib/locales/en-AU/names/firstName.js: -------------------------------------------------------------------------------- 1 | module.exports = [ 2 | "William", 3 | "Jack", 4 | "Oliver", 5 | "Joshua", 6 | "Thomas", 7 | "Lachlan", 8 | "Cooper", 9 | "Noah", 10 | "Ethan", 11 | "Lucas", 12 | "James", 13 | "Samuel", 14 | "Jacob", 15 | "Liam", 16 | "Alexander", 17 | "Benjamin", 18 | "Max", 19 | "Isaac", 20 | "Daniel", 21 | "Riley", 22 | "Ryan", 23 | "Charlie", 24 | "Tyler", 25 | "Jake", 26 | "Matthew", 27 | "Xavier", 28 | "Harry", 29 | "Jayden", 30 | "Nicholas", 31 | "Harrison", 32 | "Levi", 33 | "Luke", 34 | "Adam", 35 | "Henry", 36 | "Aiden", 37 | "Dylan", 38 | "Oscar", 39 | "Michael", 40 | "Jackson", 41 | "Logan", 42 | "Joseph", 43 | "Blake", 44 | "Nathan", 45 | "Connor", 46 | "Elijah", 47 | "Nate", 48 | "Archie", 49 | "Bailey", 50 | "Marcus", 51 | "Cameron", 52 | "Jordan", 53 | "Zachary", 54 | "Caleb", 55 | "Hunter", 56 | "Ashton", 57 | "Toby", 58 | "Aidan", 59 | "Hayden", 60 | "Mason", 61 | "Hamish", 62 | "Edward", 63 | "Angus", 64 | "Eli", 65 | "Sebastian", 66 | "Christian", 67 | "Patrick", 68 | "Andrew", 69 | "Anthony", 70 | "Luca", 71 | "Kai", 72 | "Beau", 73 | "Alex", 74 | "George", 75 | "Callum", 76 | "Finn", 77 | "Zac", 78 | "Mitchell", 79 | "Jett", 80 | "Jesse", 81 | "Gabriel", 82 | "Leo", 83 | "Declan", 84 | "Charles", 85 | "Jasper", 86 | "Jonathan", 87 | "Aaron", 88 | "Hugo", 89 | "David", 90 | "Christopher", 91 | "Chase", 92 | "Owen", 93 | "Justin", 94 | "Ali", 95 | "Darcy", 96 | "Lincoln", 97 | "Cody", 98 | "Phoenix", 99 | "Sam", 100 | "John", 101 | "Joel", 102 | "Isabella", 103 | "Ruby", 104 | "Chloe", 105 | "Olivia", 106 | "Charlotte", 107 | "Mia", 108 | "Lily", 109 | "Emily", 110 | "Ella", 111 | "Sienna", 112 | "Sophie", 113 | "Amelia", 114 | "Grace", 115 | "Ava", 116 | "Zoe", 117 | "Emma", 118 | "Sophia", 119 | "Matilda", 120 | "Hannah", 121 | "Jessica", 122 | "Lucy", 123 | "Georgia", 124 | "Sarah", 125 | "Abigail", 126 | "Zara", 127 | "Eva", 128 | "Scarlett", 129 | "Jasmine", 130 | "Chelsea", 131 | "Lilly", 132 | "Ivy", 133 | "Isla", 134 | "Evie", 135 | "Isabelle", 136 | "Maddison", 137 | "Layla", 138 | "Summer", 139 | "Annabelle", 140 | "Alexis", 141 | "Elizabeth", 142 | "Bella", 143 | "Holly", 144 | "Lara", 145 | "Madison", 146 | "Alyssa", 147 | "Maya", 148 | "Tahlia", 149 | "Claire", 150 | "Hayley", 151 | "Imogen", 152 | "Jade", 153 | "Ellie", 154 | "Sofia", 155 | "Addison", 156 | "Molly", 157 | "Phoebe", 158 | "Alice", 159 | "Savannah", 160 | "Gabriella", 161 | "Kayla", 162 | "Mikayla", 163 | "Abbey", 164 | "Eliza", 165 | "Willow", 166 | "Alexandra", 167 | "Poppy", 168 | "Samantha", 169 | "Stella", 170 | "Amy", 171 | "Amelie", 172 | "Anna", 173 | "Piper", 174 | "Gemma", 175 | "Isabel", 176 | "Victoria", 177 | "Stephanie", 178 | "Caitlin", 179 | "Heidi", 180 | "Paige", 181 | "Rose", 182 | "Amber", 183 | "Audrey", 184 | "Claudia", 185 | "Taylor", 186 | "Madeline", 187 | "Angelina", 188 | "Natalie", 189 | "Charli", 190 | "Lauren", 191 | "Ashley", 192 | "Violet", 193 | "Mackenzie", 194 | "Abby", 195 | "Skye", 196 | "Lillian", 197 | "Alana", 198 | "Lola", 199 | "Leah", 200 | "Eve", 201 | "Kiara" 202 | ]; 203 | -------------------------------------------------------------------------------- /lib/locales/en-AU/names/index.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | // Male first name 3 | firstNameM: require("./firstName"), 4 | 5 | // Femail first name 6 | firstNameF: require("./firstName"), 7 | 8 | // Male last name 9 | lastNameM: require("./lastName"), 10 | 11 | // Female last name 12 | lastNameF: require("./lastName"), 13 | 14 | prefix: [ 15 | "Pan", 16 | "Pani" 17 | ], 18 | 19 | suffix: [], 20 | 21 | name: [ 22 | "#{names.prefix} #{names.firstName} #{names.lastName}", 23 | "#{names.firstName} #{names.lastName}", 24 | "#{names.firstName} #{names.lastName}", 25 | "#{names.firstName} #{names.lastName}", 26 | "#{names.firstName} #{names.lastName}", 27 | "#{names.firstName} #{names.lastName}" 28 | ], 29 | 30 | nameM: module.exports.name, 31 | nameF: module.exports.name 32 | 33 | }; -------------------------------------------------------------------------------- /lib/locales/en-AU/phone/index.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | number: [ 3 | "0# #### ####", 4 | "+61 # #### ####", 5 | "04## ### ###", 6 | "+61 4## ### ###" 7 | ] 8 | }; -------------------------------------------------------------------------------- /lib/locales/en-CA/address/index.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | 3 | state: [ 4 | "Alberta", 5 | "British Columbia", 6 | "Manitoba", 7 | "New Brunswick", 8 | "Newfoundland and Labrador", 9 | "Nova Scotia", 10 | "Northwest Territories", 11 | "Nunavut", 12 | "Ontario", 13 | "Prince Edward Island", 14 | "Quebec", 15 | "Saskatchewan", 16 | "Yukon" 17 | ], 18 | stateAbbr: [ 19 | "AB", 20 | "BC", 21 | "MB", 22 | "NB", 23 | "NL", 24 | "NS", 25 | "NU", 26 | "NT", 27 | "ON", 28 | "PE", 29 | "QC", 30 | "SK", 31 | "YT" 32 | ], 33 | 34 | postCode: [ 35 | "?#? #?#" 36 | ] 37 | 38 | }; -------------------------------------------------------------------------------- /lib/locales/en-CA/address/streetSuffix.js: -------------------------------------------------------------------------------- 1 | module.exports = [ 2 | "Avenue", 3 | "Boulevard", 4 | "Circle", 5 | "Circuit", 6 | "Court", 7 | "Crescent", 8 | "Crest", 9 | "Drive", 10 | "Estate Dr", 11 | "Grove", 12 | "Hill", 13 | "Island", 14 | "Junction", 15 | "Knoll", 16 | "Lane", 17 | "Loop", 18 | "Mall", 19 | "Manor", 20 | "Meadow", 21 | "Mews", 22 | "Parade", 23 | "Parkway", 24 | "Pass", 25 | "Place", 26 | "Plaza", 27 | "Ridge", 28 | "Road", 29 | "Run", 30 | "Square", 31 | "Station St", 32 | "Street", 33 | "Summit", 34 | "Terrace", 35 | "Track", 36 | "Trail", 37 | "View Rd", 38 | "Way" 39 | ]; 40 | -------------------------------------------------------------------------------- /lib/locales/en-CA/build.js: -------------------------------------------------------------------------------- 1 | import isNil from "lodash/isNil"; 2 | import isArray from "lodash/isArray"; 3 | import isFunction from "lodash/isFunction"; 4 | import isObject from "lodash/isObject"; 5 | import mergeWith from "lodash/mergeWith"; 6 | 7 | import Fakerator from "lib/fakerator"; 8 | 9 | module.exports = function() { 10 | let locale = require("lib/locales/en-CA"); 11 | let fbLocale = require("lib/locales/default"); 12 | 13 | // Merge locale and fallback 14 | locale = mergeWith(locale, fbLocale, (objValue) => { 15 | // DON'T MERGE ARRAYS 16 | if (isArray(objValue) || isFunction(objValue)) 17 | return objValue; 18 | 19 | if (!isNil(objValue) && !isObject(objValue)) 20 | return objValue; 21 | }); 22 | 23 | return new Fakerator(locale); 24 | }; -------------------------------------------------------------------------------- /lib/locales/en-CA/index.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | _meta: { 3 | id: "en-AU", 4 | fallback: null, 5 | language: "English (Canada)", 6 | country: "Canada", 7 | countryCode: "CA" 8 | }, 9 | 10 | address: require("./address"), 11 | internet: require("./internet") 12 | }; -------------------------------------------------------------------------------- /lib/locales/en-CA/internet/index.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | tld: [ 3 | "ca", 4 | "com", 5 | "biz", 6 | "info", 7 | "name", 8 | "net", 9 | "org" 10 | ] 11 | 12 | }; -------------------------------------------------------------------------------- /lib/locales/en-CA/phone/index.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | number: [ 3 | "0# #### ####", 4 | "+61 # #### ####", 5 | "04## ### ###", 6 | "+61 4## ### ###" 7 | ] 8 | }; -------------------------------------------------------------------------------- /lib/locales/es-ES/address/cityName.js: -------------------------------------------------------------------------------- 1 | module.exports = [ 2 | "Parla", 3 | "Telde", 4 | "Baracaldo", 5 | "San Fernando", 6 | "Torrevieja", 7 | "Lugo", 8 | "Santiago de Compostela", 9 | "Gerona", 10 | "Cáceres", 11 | "Lorca", 12 | "Coslada", 13 | "Talavera de la Reina", 14 | "El Puerto de Santa María", 15 | "Cornellá de Llobregat", 16 | "Avilés", 17 | "Palencia", 18 | "Gecho", 19 | "Orihuela", 20 | "Pontevedra", 21 | "Pozuelo de Alarcón", 22 | "Toledo", 23 | "El Ejido", 24 | "Guadalajara", 25 | "Gandía", 26 | "Ceuta", 27 | "Ferrol", 28 | "Chiclana de la Frontera", 29 | "Manresa", 30 | "Roquetas de Mar", 31 | "Ciudad Real", 32 | "Rubí", 33 | "Benidorm", 34 | "San Sebastían de los Reyes", 35 | "Ponferrada", 36 | "Zamora", 37 | "Alcalá de Guadaira", 38 | "Fuengirola", 39 | "Mijas", 40 | "Sanlúcar de Barrameda", 41 | "La Línea de la Concepción", 42 | "Majadahonda", 43 | "Sagunto", 44 | "El Prat de LLobregat", 45 | "Viladecans", 46 | "Linares", 47 | "Alcoy", 48 | "Irún", 49 | "Estepona", 50 | "Torremolinos", 51 | "Rivas-Vaciamadrid", 52 | "Molina de Segura", 53 | "Paterna", 54 | "Granollers", 55 | "Santa Lucía de Tirajana", 56 | "Motril", 57 | "Cerdañola del Vallés", 58 | "Arrecife", 59 | "Segovia", 60 | "Torrelavega", 61 | "Elda", 62 | "Mérida", 63 | "Ávila", 64 | "Valdemoro", 65 | "Cuenta", 66 | "Collado Villalba", 67 | "Benalmádena", 68 | "Mollet del Vallés", 69 | "Puertollano", 70 | "Madrid", 71 | "Barcelona", 72 | "Valencia", 73 | "Sevilla", 74 | "Zaragoza", 75 | "Málaga", 76 | "Murcia", 77 | "Palma de Mallorca", 78 | "Las Palmas de Gran Canaria", 79 | "Bilbao", 80 | "Córdoba", 81 | "Alicante", 82 | "Valladolid", 83 | "Vigo", 84 | "Gijón", 85 | "Hospitalet de LLobregat", 86 | "La Coruña", 87 | "Granada", 88 | "Vitoria", 89 | "Elche", 90 | "Santa Cruz de Tenerife", 91 | "Oviedo", 92 | "Badalona", 93 | "Cartagena", 94 | "Móstoles", 95 | "Jerez de la Frontera", 96 | "Tarrasa", 97 | "Sabadell", 98 | "Alcalá de Henares", 99 | "Pamplona", 100 | "Fuenlabrada", 101 | "Almería", 102 | "San Sebastián", 103 | "Leganés", 104 | "Santander", 105 | "Burgos", 106 | "Castellón de la Plana", 107 | "Alcorcón", 108 | "Albacete", 109 | "Getafe", 110 | "Salamanca", 111 | "Huelva", 112 | "Logroño", 113 | "Badajoz", 114 | "San Cristróbal de la Laguna", 115 | "León", 116 | "Tarragona", 117 | "Cádiz", 118 | "Lérida", 119 | "Marbella", 120 | "Mataró", 121 | "Dos Hermanas", 122 | "Santa Coloma de Gramanet", 123 | "Jaén", 124 | "Algeciras", 125 | "Torrejón de Ardoz", 126 | "Orense", 127 | "Alcobendas", 128 | "Reus", 129 | "Calahorra", 130 | "Inca" 131 | ]; 132 | -------------------------------------------------------------------------------- /lib/locales/es-ES/address/index.js: -------------------------------------------------------------------------------- 1 | import countries from "./countryWithCodes"; 2 | 3 | module.exports = { 4 | countryAndCode() { 5 | let country = this.random.objectElement(countries); 6 | return { 7 | code: Object.keys(country)[0], 8 | name: country[Object.keys(country)[0]] 9 | }; 10 | }, 11 | 12 | state: [ 13 | "Andalucía", 14 | "Aragón", 15 | "Principado de Asturias", 16 | "Baleares", 17 | "Canarias", 18 | "Cantabria", 19 | "Castilla-La Mancha", 20 | "Castilla y León", 21 | "Cataluña", 22 | "Comunidad Valenciana", 23 | "Extremadura", 24 | "Galicia", 25 | "La Rioja", 26 | "Comunidad de Madrid", 27 | "Navarra", 28 | "País Vasco", 29 | "Región de Murcia" 30 | ], 31 | stateAbbr: [ 32 | "And", 33 | "Ara", 34 | "Ast", 35 | "Bal", 36 | "Can", 37 | "Cbr", 38 | "Man", 39 | "Leo", 40 | "Cat", 41 | "Com", 42 | "Ext", 43 | "Gal", 44 | "Rio", 45 | "Mad", 46 | "Nav", 47 | "Vas", 48 | "Mur" 49 | ], 50 | 51 | city: require("./cityName"), 52 | 53 | street: [ 54 | "#{address.streetName}#{address.buildingNumber}", 55 | "#{address.streetName}#{address.buildingNumber} Esc. ###", 56 | "#{address.streetName}#{address.buildingNumber} Puerta ###" 57 | ], 58 | 59 | streetName: [ 60 | "#{address.streetSuffix} #{names.firstName}", 61 | "#{address.streetSuffix} #{names.firstName} #{names.lastName}" 62 | ], 63 | 64 | streetSuffix: require("./streetSuffix"), 65 | 66 | buildingNumber: [ 67 | " s/n.", 68 | ", #", 69 | ", ##", 70 | " #", 71 | " ##" 72 | ], 73 | 74 | postCode: [ 75 | "#####" 76 | ] 77 | 78 | }; -------------------------------------------------------------------------------- /lib/locales/es-ES/address/streetSuffix.js: -------------------------------------------------------------------------------- 1 | module.exports = [ 2 | "Aldea", 3 | "Apartamento", 4 | "Arrabal", 5 | "Arroyo", 6 | "Avenida", 7 | "Bajada", 8 | "Barranco", 9 | "Barrio", 10 | "Bloque", 11 | "Calle", 12 | "Calleja", 13 | "Camino", 14 | "Carretera", 15 | "Caserio", 16 | "Colegio", 17 | "Colonia", 18 | "Conjunto", 19 | "Cuesta", 20 | "Chalet", 21 | "Edificio", 22 | "Entrada", 23 | "Escalinata", 24 | "Explanada", 25 | "Extramuros", 26 | "Extrarradio", 27 | "Ferrocarril", 28 | "Glorieta", 29 | "Gran Subida", 30 | "Grupo", 31 | "Huerta", 32 | "Jardines", 33 | "Lado", 34 | "Lugar", 35 | "Manzana", 36 | "Masía", 37 | "Mercado", 38 | "Monte", 39 | "Muelle", 40 | "Municipio", 41 | "Parcela", 42 | "Parque", 43 | "Partida", 44 | "Pasaje", 45 | "Paseo", 46 | "Plaza", 47 | "Poblado", 48 | "Polígono", 49 | "Prolongación", 50 | "Puente", 51 | "Puerta", 52 | "Quinta", 53 | "Ramal", 54 | "Rambla", 55 | "Rampa", 56 | "Riera", 57 | "Rincón", 58 | "Ronda", 59 | "Rua", 60 | "Salida", 61 | "Sector", 62 | "Sección", 63 | "Senda", 64 | "Solar", 65 | "Subida", 66 | "Terrenos", 67 | "Torrente", 68 | "Travesía", 69 | "Urbanización", 70 | "Vía", 71 | "Vía Pública" 72 | ]; 73 | -------------------------------------------------------------------------------- /lib/locales/es-ES/build.js: -------------------------------------------------------------------------------- 1 | import isNil from "lodash/isNil"; 2 | import isArray from "lodash/isArray"; 3 | import isFunction from "lodash/isFunction"; 4 | import isObject from "lodash/isObject"; 5 | import mergeWith from "lodash/mergeWith"; 6 | 7 | import Fakerator from "lib/fakerator"; 8 | 9 | module.exports = function() { 10 | let locale = require("lib/locales/es-ES"); 11 | let fbLocale = require("lib/locales/default"); 12 | 13 | // Merge locale and fallback 14 | locale = mergeWith(locale, fbLocale, (objValue) => { 15 | // DON'T MERGE ARRAYS 16 | if (isArray(objValue) || isFunction(objValue)) 17 | return objValue; 18 | 19 | if (!isNil(objValue) && !isObject(objValue)) 20 | return objValue; 21 | }); 22 | 23 | return new Fakerator(locale); 24 | }; -------------------------------------------------------------------------------- /lib/locales/es-ES/company/index.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | name: [ 3 | "#{names.lastName} #{company.suffix}", 4 | "#{names.lastName} y #{names.lastName}", 5 | "#{names.lastName} #{names.lastName} #{company.suffix}", 6 | "#{names.lastName}, #{names.lastName} y #{names.lastName} Asociados" 7 | ], 8 | 9 | suffix: [ 10 | "S.L.", 11 | "e Hijos", 12 | "S.A.", 13 | "Hermanos" 14 | ] 15 | }; -------------------------------------------------------------------------------- /lib/locales/es-ES/index.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | _meta: { 3 | id: "es-ES", 4 | fallback: null, 5 | language: "Spanish", 6 | country: "Spain", 7 | countryCode: "ES" 8 | }, 9 | 10 | names: require("./names"), 11 | phone: require("./phone"), 12 | address: require("./address"), 13 | company: require("./company"), 14 | internet: require("./internet") 15 | }; -------------------------------------------------------------------------------- /lib/locales/es-ES/internet/index.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | tld: [ 3 | "com", 4 | "es", 5 | "info", 6 | "com.es", 7 | "org" 8 | ] 9 | 10 | }; -------------------------------------------------------------------------------- /lib/locales/es-ES/names/firstName.js: -------------------------------------------------------------------------------- 1 | module.exports = [ 2 | "Adán", 3 | "Agustín", 4 | "Alberto", 5 | "Alejandro", 6 | "Alfonso", 7 | "Alfredo", 8 | "Andrés", 9 | "Antonio", 10 | "Armando", 11 | "Arturo", 12 | "Benito", 13 | "Benjamín", 14 | "Bernardo", 15 | "Carlos", 16 | "César", 17 | "Claudio", 18 | "Clemente", 19 | "Cristian", 20 | "Cristobal", 21 | "Daniel", 22 | "David", 23 | "Diego", 24 | "Eduardo", 25 | "Emilio", 26 | "Enrique", 27 | "Ernesto", 28 | "Esteban", 29 | "Federico", 30 | "Felipe", 31 | "Fernando", 32 | "Francisco", 33 | "Gabriel", 34 | "Gerardo", 35 | "Germán", 36 | "Gilberto", 37 | "Gonzalo", 38 | "Gregorio", 39 | "Guillermo", 40 | "Gustavo", 41 | "Hernán", 42 | "Homero", 43 | "Horacio", 44 | "Hugo", 45 | "Ignacio", 46 | "Jacobo", 47 | "Jaime", 48 | "Javier", 49 | "Jerónimo", 50 | "Jesús", 51 | "Joaquín", 52 | "Jorge", 53 | "Jorge Luis", 54 | "José", 55 | "José Eduardo", 56 | "José Emilio", 57 | "José Luis", 58 | "José María", 59 | "Juan", 60 | "Juan Carlos", 61 | "Julio", 62 | "Julio César", 63 | "Lorenzo", 64 | "Lucas", 65 | "Luis", 66 | "Luis Miguel", 67 | "Manuel", 68 | "Marco Antonio", 69 | "Marcos", 70 | "Mariano", 71 | "Mario", 72 | "Martín", 73 | "Mateo", 74 | "Miguel", 75 | "Miguel Ángel", 76 | "Nicolás", 77 | "Octavio", 78 | "Óscar", 79 | "Pablo", 80 | "Patricio", 81 | "Pedro", 82 | "Rafael", 83 | "Ramiro", 84 | "Ramón", 85 | "Raúl", 86 | "Ricardo", 87 | "Roberto", 88 | "Rodrigo", 89 | "Rubén", 90 | "Salvador", 91 | "Samuel", 92 | "Sancho", 93 | "Santiago", 94 | "Sergio", 95 | "Teodoro", 96 | "Timoteo", 97 | "Tomás", 98 | "Vicente", 99 | "Víctor", 100 | "Adela", 101 | "Adriana", 102 | "Alejandra", 103 | "Alicia", 104 | "Amalia", 105 | "Ana", 106 | "Ana Luisa", 107 | "Ana María", 108 | "Andrea", 109 | "Anita", 110 | "Ángela", 111 | "Antonia", 112 | "Ariadna", 113 | "Barbara", 114 | "Beatriz", 115 | "Berta", 116 | "Blanca", 117 | "Caridad", 118 | "Carla", 119 | "Carlota", 120 | "Carmen", 121 | "Carolina", 122 | "Catalina", 123 | "Cecilia", 124 | "Clara", 125 | "Claudia", 126 | "Concepción", 127 | "Conchita", 128 | "Cristina", 129 | "Daniela", 130 | "Débora", 131 | "Diana", 132 | "Dolores", 133 | "Lola", 134 | "Dorotea", 135 | "Elena", 136 | "Elisa", 137 | "Eloisa", 138 | "Elsa", 139 | "Elvira", 140 | "Emilia", 141 | "Esperanza", 142 | "Estela", 143 | "Ester", 144 | "Eva", 145 | "Florencia", 146 | "Francisca", 147 | "Gabriela", 148 | "Gloria", 149 | "Graciela", 150 | "Guadalupe", 151 | "Guillermina", 152 | "Inés", 153 | "Irene", 154 | "Isabel", 155 | "Isabela", 156 | "Josefina", 157 | "Juana", 158 | "Julia", 159 | "Laura", 160 | "Leonor", 161 | "Leticia", 162 | "Lilia", 163 | "Lorena", 164 | "Lourdes", 165 | "Lucia", 166 | "Luisa", 167 | "Luz", 168 | "Magdalena", 169 | "Manuela", 170 | "Marcela", 171 | "Margarita", 172 | "María", 173 | "María del Carmen", 174 | "María Cristina", 175 | "María Elena", 176 | "María Eugenia", 177 | "María José", 178 | "María Luisa", 179 | "María Soledad", 180 | "María Teresa", 181 | "Mariana", 182 | "Maricarmen", 183 | "Marilu", 184 | "Marisol", 185 | "Marta", 186 | "Mayte", 187 | "Mercedes", 188 | "Micaela", 189 | "Mónica", 190 | "Natalia", 191 | "Norma", 192 | "Olivia", 193 | "Patricia", 194 | "Pilar", 195 | "Ramona", 196 | "Raquel", 197 | "Rebeca", 198 | "Reina", 199 | "Rocio", 200 | "Rosa", 201 | "Rosalia", 202 | "Rosario", 203 | "Sara", 204 | "Silvia", 205 | "Sofia", 206 | "Soledad", 207 | "Sonia", 208 | "Susana", 209 | "Teresa", 210 | "Verónica", 211 | "Victoria", 212 | "Virginia", 213 | "Yolanda" 214 | ]; 215 | -------------------------------------------------------------------------------- /lib/locales/es-ES/names/index.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | // Male first name 3 | firstNameM: require("./firstName"), 4 | 5 | // Femail first name 6 | firstNameF: require("./firstName"), 7 | 8 | // Male last name 9 | lastNameM: require("./lastName"), 10 | 11 | // Female last name 12 | lastNameF: require("./lastName"), 13 | 14 | prefix: [ 15 | "Sr.", 16 | "Sra.", 17 | "Sta." 18 | ], 19 | 20 | suffix: [], 21 | 22 | name: [ 23 | "#{names.prefix} #{names.firstName} #{names.lastName} #{names.lastName}", 24 | "#{names.firstName} #{names.lastName} #{names.lastName}", 25 | "#{names.firstName} #{names.lastName} #{names.lastName}", 26 | "#{names.firstName} #{names.lastName} #{names.lastName}", 27 | "#{names.firstName} #{names.lastName} #{names.lastName}" 28 | ], 29 | 30 | nameM: module.exports.name, 31 | nameF: module.exports.name 32 | 33 | }; -------------------------------------------------------------------------------- /lib/locales/es-ES/phone/index.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | number: [ 3 | "9##-###-###", 4 | "9##.###.###", 5 | "9## ### ###", 6 | "9########" 7 | ] 8 | }; -------------------------------------------------------------------------------- /lib/locales/fr-FR/address/cityName.js: -------------------------------------------------------------------------------- 1 | module.exports = [ 2 | "Paris", 3 | "Marseille", 4 | "Lyon", 5 | "Toulouse", 6 | "Nice", 7 | "Nantes", 8 | "Strasbourg", 9 | "Montpellier", 10 | "Bordeaux", 11 | "Lille13", 12 | "Rennes", 13 | "Reims", 14 | "Le Havre", 15 | "Saint-Étienne", 16 | "Toulon", 17 | "Grenoble", 18 | "Dijon", 19 | "Angers", 20 | "Saint-Denis", 21 | "Villeurbanne", 22 | "Le Mans", 23 | "Aix-en-Provence", 24 | "Brest", 25 | "Nîmes", 26 | "Limoges", 27 | "Clermont-Ferrand", 28 | "Tours", 29 | "Amiens", 30 | "Metz", 31 | "Perpignan", 32 | "Besançon", 33 | "Orléans", 34 | "Boulogne-Billancourt", 35 | "Mulhouse", 36 | "Rouen", 37 | "Caen", 38 | "Nancy", 39 | "Saint-Denis", 40 | "Saint-Paul", 41 | "Montreuil", 42 | "Argenteuil", 43 | "Roubaix", 44 | "Dunkerque14", 45 | "Tourcoing", 46 | "Nanterre", 47 | "Avignon", 48 | "Créteil", 49 | "Poitiers", 50 | "Fort-de-France", 51 | "Courbevoie", 52 | "Versailles", 53 | "Vitry-sur-Seine", 54 | "Colombes", 55 | "Pau", 56 | "Aulnay-sous-Bois", 57 | "Asnières-sur-Seine", 58 | "Rueil-Malmaison", 59 | "Saint-Pierre", 60 | "Antibes", 61 | "Saint-Maur-des-Fossés", 62 | "Champigny-sur-Marne", 63 | "La Rochelle", 64 | "Aubervilliers", 65 | "Calais", 66 | "Cannes", 67 | "Le Tampon", 68 | "Béziers", 69 | "Colmar", 70 | "Bourges", 71 | "Drancy", 72 | "Mérignac", 73 | "Saint-Nazaire", 74 | "Valence", 75 | "Ajaccio", 76 | "Issy-les-Moulineaux", 77 | "Villeneuve-d'Ascq", 78 | "Levallois-Perret", 79 | "Noisy-le-Grand", 80 | "Quimper", 81 | "La Seyne-sur-Mer", 82 | "Antony", 83 | "Troyes", 84 | "Neuilly-sur-Seine", 85 | "Sarcelles", 86 | "Les Abymes", 87 | "Vénissieux", 88 | "Clichy", 89 | "Lorient", 90 | "Pessac", 91 | "Ivry-sur-Seine", 92 | "Cergy", 93 | "Cayenne", 94 | "Niort", 95 | "Chambéry", 96 | "Montauban", 97 | "Saint-Quentin", 98 | "Villejuif", 99 | "Hyères", 100 | "Beauvais", 101 | "Cholet" 102 | ]; 103 | -------------------------------------------------------------------------------- /lib/locales/fr-FR/address/index.js: -------------------------------------------------------------------------------- 1 | import countries from "./countryWithCodes"; 2 | 3 | module.exports = { 4 | countryAndCode() { 5 | let country = this.random.objectElement(countries); 6 | return { 7 | code: Object.keys(country)[0], 8 | name: country[Object.keys(country)[0]] 9 | }; 10 | }, 11 | 12 | state: [ 13 | "Alsace", 14 | "Aquitaine", 15 | "Auvergne", 16 | "Basse-Normandie", 17 | "Bourgogne", 18 | "Bretagne", 19 | "Centre", 20 | "Champagne-Ardenne", 21 | "Corse", 22 | "Franche-Comté", 23 | "Haute-Normandie", 24 | "Île-de-France", 25 | "Languedoc-Roussillon", 26 | "Limousin", 27 | "Lorraine", 28 | "Midi-Pyrénées", 29 | "Nord-Pas-de-Calais", 30 | "Pays de la Loire", 31 | "Picardie", 32 | "Poitou-Charentes", 33 | "Provence-Alpes-Côte d'Azur", 34 | "Rhône-Alpes" 35 | ], 36 | stateAbbr: [], 37 | 38 | city: require("./cityName"), 39 | 40 | street: [ 41 | "#{address.buildingNumber} #{address.streetName}" 42 | ], 43 | 44 | streetName: [ 45 | "#{address.streetPrefix} #{address.streetSuffix}" 46 | ], 47 | 48 | streetPrefix: require("./streetPrefix"), 49 | 50 | streetSuffix: require("./streetSuffix"), 51 | 52 | buildingNumber: [ 53 | "####", 54 | "###", 55 | "##", 56 | "#" 57 | ], 58 | 59 | postCode: [ 60 | "#####" 61 | ] 62 | 63 | }; -------------------------------------------------------------------------------- /lib/locales/fr-FR/address/streetPrefix.js: -------------------------------------------------------------------------------- 1 | module.exports = [ 2 | "Allée, Voie", 3 | "Rue", 4 | "Avenue", 5 | "Boulevard", 6 | "Quai", 7 | "Passage", 8 | "Impasse", 9 | "Place" 10 | ]; 11 | -------------------------------------------------------------------------------- /lib/locales/fr-FR/address/streetSuffix.js: -------------------------------------------------------------------------------- 1 | module.exports = [ 2 | "de l'Abbaye", 3 | "Adolphe Mille", 4 | "d'Alésia", 5 | "d'Argenteuil", 6 | "d'Assas", 7 | "du Bac", 8 | "de Paris", 9 | "La Boétie", 10 | "Bonaparte", 11 | "de la Bûcherie", 12 | "de Caumartin", 13 | "Charlemagne", 14 | "du Chat-qui-Pêche", 15 | "de la Chaussée-d'Antin", 16 | "du Dahomey", 17 | "Dauphine", 18 | "Delesseux", 19 | "du Faubourg Saint-Honoré", 20 | "du Faubourg-Saint-Denis", 21 | "de la Ferronnerie", 22 | "des Francs-Bourgeois", 23 | "des Grands Augustins", 24 | "de la Harpe", 25 | "du Havre", 26 | "de la Huchette", 27 | "Joubert", 28 | "Laffitte", 29 | "Lepic", 30 | "des Lombards", 31 | "Marcadet", 32 | "Molière", 33 | "Monsieur-le-Prince", 34 | "de Montmorency", 35 | "Montorgueil", 36 | "Mouffetard", 37 | "de Nesle", 38 | "Oberkampf", 39 | "de l'Odéon", 40 | "d'Orsel", 41 | "de la Paix", 42 | "des Panoramas", 43 | "Pastourelle", 44 | "Pierre Charron", 45 | "de la Pompe", 46 | "de Presbourg", 47 | "de Provence", 48 | "de Richelieu", 49 | "de Rivoli", 50 | "des Rosiers", 51 | "Royale", 52 | "d'Abbeville", 53 | "Saint-Honoré", 54 | "Saint-Bernard", 55 | "Saint-Denis", 56 | "Saint-Dominique", 57 | "Saint-Jacques", 58 | "Saint-Séverin", 59 | "des Saussaies", 60 | "de Seine", 61 | "de Solférino", 62 | "Du Sommerard", 63 | "de Tilsitt", 64 | "Vaneau", 65 | "de Vaugirard", 66 | "de la Victoire", 67 | "Zadkine" 68 | ]; 69 | -------------------------------------------------------------------------------- /lib/locales/fr-FR/build.js: -------------------------------------------------------------------------------- 1 | import isNil from "lodash/isNil"; 2 | import isArray from "lodash/isArray"; 3 | import isFunction from "lodash/isFunction"; 4 | import isObject from "lodash/isObject"; 5 | import mergeWith from "lodash/mergeWith"; 6 | 7 | import Fakerator from "lib/fakerator"; 8 | 9 | module.exports = function() { 10 | let locale = require("lib/locales/fr-FR"); 11 | let fbLocale = require("lib/locales/default"); 12 | 13 | // Merge locale and fallback 14 | locale = mergeWith(locale, fbLocale, (objValue) => { 15 | // DON'T MERGE ARRAYS 16 | if (isArray(objValue) || isFunction(objValue)) 17 | return objValue; 18 | 19 | if (!isNil(objValue) && !isObject(objValue)) 20 | return objValue; 21 | }); 22 | 23 | return new Fakerator(locale); 24 | }; -------------------------------------------------------------------------------- /lib/locales/fr-FR/company/index.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | name: [ 3 | "#{names.lastName} #{company.suffix}", 4 | "#{names.lastName} et #{names.lastName}" 5 | ], 6 | 7 | suffix: [ 8 | "SARL", 9 | "SA", 10 | "EURL", 11 | "SAS", 12 | "SEM", 13 | "SCOP", 14 | "GIE", 15 | "EI" 16 | ] 17 | }; -------------------------------------------------------------------------------- /lib/locales/fr-FR/index.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | _meta: { 3 | id: "fr-FR", 4 | fallback: null, 5 | language: "French", 6 | country: "France", 7 | countryCode: "FR" 8 | }, 9 | 10 | names: require("./names"), 11 | phone: require("./phone"), 12 | address: require("./address"), 13 | company: require("./company"), 14 | internet: require("./internet") 15 | }; -------------------------------------------------------------------------------- /lib/locales/fr-FR/internet/index.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | tld: [ 3 | "com", 4 | "fr", 5 | "eu", 6 | "info", 7 | "name", 8 | "net", 9 | "org" 10 | ], 11 | 12 | emailDomain: [ 13 | "gmail.com", 14 | "yahoo.fr", 15 | "hotmail.fr" 16 | ] 17 | 18 | }; -------------------------------------------------------------------------------- /lib/locales/fr-FR/names/firstName.js: -------------------------------------------------------------------------------- 1 | module.exports = [ 2 | "Enzo", 3 | "Lucas", 4 | "Mathis", 5 | "Nathan", 6 | "Thomas", 7 | "Hugo", 8 | "Théo", 9 | "Tom", 10 | "Louis", 11 | "Raphaël", 12 | "Clément", 13 | "Léo", 14 | "Mathéo", 15 | "Maxime", 16 | "Alexandre", 17 | "Antoine", 18 | "Yanis", 19 | "Paul", 20 | "Baptiste", 21 | "Alexis", 22 | "Gabriel", 23 | "Arthur", 24 | "Jules", 25 | "Ethan", 26 | "Noah", 27 | "Quentin", 28 | "Axel", 29 | "Evan", 30 | "Mattéo", 31 | "Romain", 32 | "Valentin", 33 | "Maxence", 34 | "Noa", 35 | "Adam", 36 | "Nicolas", 37 | "Julien", 38 | "Mael", 39 | "Pierre", 40 | "Rayan", 41 | "Victor", 42 | "Mohamed", 43 | "Adrien", 44 | "Kylian", 45 | "Sacha", 46 | "Benjamin", 47 | "Léa", 48 | "Clara", 49 | "Manon", 50 | "Chloé", 51 | "Camille", 52 | "Ines", 53 | "Sarah", 54 | "Jade", 55 | "Lola", 56 | "Anaïs", 57 | "Lucie", 58 | "Océane", 59 | "Lilou", 60 | "Marie", 61 | "Eva", 62 | "Romane", 63 | "Lisa", 64 | "Zoe", 65 | "Julie", 66 | "Mathilde", 67 | "Louise", 68 | "Juliette", 69 | "Clémence", 70 | "Célia", 71 | "Laura", 72 | "Lena", 73 | "Maëlys", 74 | "Charlotte", 75 | "Ambre", 76 | "Maeva", 77 | "Pauline", 78 | "Lina", 79 | "Jeanne", 80 | "Lou", 81 | "Noémie", 82 | "Justine", 83 | "Louna", 84 | "Elisa", 85 | "Alice", 86 | "Emilie", 87 | "Carla", 88 | "Maëlle", 89 | "Alicia", 90 | "Mélissa" 91 | ]; 92 | -------------------------------------------------------------------------------- /lib/locales/fr-FR/names/index.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | // Male first name 3 | firstNameM: require("./firstName"), 4 | 5 | // Femail first name 6 | firstNameF: require("./firstName"), 7 | 8 | // Male last name 9 | lastNameM: require("./lastName"), 10 | 11 | // Female last name 12 | lastNameF: require("./lastName"), 13 | 14 | prefix: [ 15 | "M", 16 | "Mme", 17 | "Mlle", 18 | "Dr", 19 | "Prof" 20 | ], 21 | 22 | suffix: [], 23 | 24 | name: [ 25 | "#{names.prefix} #{names.firstName} #{names.lastName}", 26 | "#{names.firstName} #{names.lastName}", 27 | "#{names.lastName} #{names.firstName}" 28 | ], 29 | 30 | nameM: module.exports.name, 31 | nameF: module.exports.name 32 | 33 | }; -------------------------------------------------------------------------------- /lib/locales/fr-FR/names/lastName.js: -------------------------------------------------------------------------------- 1 | module.exports = [ 2 | "Martin", 3 | "Bernard", 4 | "Dubois", 5 | "Thomas", 6 | "Robert", 7 | "Richard", 8 | "Petit", 9 | "Durand", 10 | "Leroy", 11 | "Moreau", 12 | "Simon", 13 | "Laurent", 14 | "Lefebvre", 15 | "Michel", 16 | "Garcia", 17 | "David", 18 | "Bertrand", 19 | "Roux", 20 | "Vincent", 21 | "Fournier", 22 | "Morel", 23 | "Girard", 24 | "Andre", 25 | "Lefevre", 26 | "Mercier", 27 | "Dupont", 28 | "Lambert", 29 | "Bonnet", 30 | "Francois", 31 | "Martinez", 32 | "Legrand", 33 | "Garnier", 34 | "Faure", 35 | "Rousseau", 36 | "Blanc", 37 | "Guerin", 38 | "Muller", 39 | "Henry", 40 | "Roussel", 41 | "Nicolas", 42 | "Perrin", 43 | "Morin", 44 | "Mathieu", 45 | "Clement", 46 | "Gauthier", 47 | "Dumont", 48 | "Lopez", 49 | "Fontaine", 50 | "Chevalier", 51 | "Robin", 52 | "Masson", 53 | "Sanchez", 54 | "Gerard", 55 | "Nguyen", 56 | "Boyer", 57 | "Denis", 58 | "Lemaire", 59 | "Duval", 60 | "Joly", 61 | "Gautier", 62 | "Roger", 63 | "Roche", 64 | "Roy", 65 | "Noel", 66 | "Meyer", 67 | "Lucas", 68 | "Meunier", 69 | "Jean", 70 | "Perez", 71 | "Marchand", 72 | "Dufour", 73 | "Blanchard", 74 | "Marie", 75 | "Barbier", 76 | "Brun", 77 | "Dumas", 78 | "Brunet", 79 | "Schmitt", 80 | "Leroux", 81 | "Colin", 82 | "Fernandez", 83 | "Pierre", 84 | "Renard", 85 | "Arnaud", 86 | "Rolland", 87 | "Caron", 88 | "Aubert", 89 | "Giraud", 90 | "Leclerc", 91 | "Vidal", 92 | "Bourgeois", 93 | "Renaud", 94 | "Lemoine", 95 | "Picard", 96 | "Gaillard", 97 | "Philippe", 98 | "Leclercq", 99 | "Lacroix", 100 | "Fabre", 101 | "Dupuis", 102 | "Olivier", 103 | "Rodriguez", 104 | "Da silva", 105 | "Hubert", 106 | "Louis", 107 | "Charles", 108 | "Guillot", 109 | "Riviere", 110 | "Le gall", 111 | "Guillaume", 112 | "Adam", 113 | "Rey", 114 | "Moulin", 115 | "Gonzalez", 116 | "Berger", 117 | "Lecomte", 118 | "Menard", 119 | "Fleury", 120 | "Deschamps", 121 | "Carpentier", 122 | "Julien", 123 | "Benoit", 124 | "Paris", 125 | "Maillard", 126 | "Marchal", 127 | "Aubry", 128 | "Vasseur", 129 | "Le roux", 130 | "Renault", 131 | "Jacquet", 132 | "Collet", 133 | "Prevost", 134 | "Poirier", 135 | "Charpentier", 136 | "Royer", 137 | "Huet", 138 | "Baron", 139 | "Dupuy", 140 | "Pons", 141 | "Paul", 142 | "Laine", 143 | "Carre", 144 | "Breton", 145 | "Remy", 146 | "Schneider", 147 | "Perrot", 148 | "Guyot", 149 | "Barre", 150 | "Marty", 151 | "Cousin" 152 | ]; 153 | -------------------------------------------------------------------------------- /lib/locales/fr-FR/phone/index.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | number: [ 3 | "01########", 4 | "02########", 5 | "03########", 6 | "04########", 7 | "05########", 8 | "06########", 9 | "07########", 10 | "+33 1########", 11 | "+33 2########", 12 | "+33 3########", 13 | "+33 4########", 14 | "+33 5########", 15 | "+33 6########", 16 | "+33 7########" 17 | ] 18 | }; -------------------------------------------------------------------------------- /lib/locales/hu-HU/address/index.js: -------------------------------------------------------------------------------- 1 | import countries from "./countryWithCodes"; 2 | 3 | module.exports = { 4 | countryAndCode() { 5 | let country = this.random.objectElement(countries); 6 | return { 7 | code: Object.keys(country)[0], 8 | name: country[Object.keys(country)[0]] 9 | }; 10 | }, 11 | 12 | state: [], 13 | stateAbbr: [], 14 | 15 | city: [ 16 | "#{address.cityPrefix}#{address.citySuffix}", 17 | "#{address.cityPrefix}#{names.firstName}#{address.citySuffix}", 18 | "#{names.firstName}#{address.citySuffix}", 19 | "#{names.lastName}#{address.citySuffix}" 20 | ], 21 | 22 | cityPrefix: [ 23 | "Duna", 24 | "Zala", 25 | "Tisza", 26 | "Sajó", 27 | "Mátra", 28 | "Bükk", 29 | "Balaton", 30 | "Buda", 31 | "Pest", 32 | "Pilis", 33 | "Nagy", 34 | "Kis", 35 | "Felső", 36 | "Alsó", 37 | "Mező" 38 | ], 39 | 40 | citySuffix: [ 41 | "tető", 42 | "alja", 43 | "némedi", 44 | "vár", 45 | "újváros", 46 | "város", 47 | "füred", 48 | "hegy", 49 | "egyház", 50 | "háza", 51 | "szék", 52 | "keresztúr", 53 | "sziget", 54 | "szeg", 55 | "lak", 56 | "bánya" 57 | ], 58 | 59 | street: [ 60 | "#{address.streetName} #{address.buildingNumber}" 61 | ], 62 | 63 | streetName: [ 64 | "#{names.lastName} #{names.firstName} #{address.streetSuffix}" 65 | ], 66 | 67 | streetSuffix: [ 68 | "utca", 69 | "út", 70 | "tér", 71 | "sor", 72 | "köz", 73 | "tér", 74 | "dűlő", 75 | "park", 76 | "sétány", 77 | "udvar", 78 | "körút" 79 | ], 80 | 81 | buildingNumber: [ 82 | "#", 83 | "##", 84 | "###", 85 | "##. #/#", 86 | "###. #. emelet #. ajtó" 87 | ], 88 | 89 | postCode: [ 90 | "####" 91 | ] 92 | 93 | }; -------------------------------------------------------------------------------- /lib/locales/hu-HU/build.js: -------------------------------------------------------------------------------- 1 | import isNil from "lodash/isNil"; 2 | import isArray from "lodash/isArray"; 3 | import isFunction from "lodash/isFunction"; 4 | import isObject from "lodash/isObject"; 5 | import mergeWith from "lodash/mergeWith"; 6 | 7 | import Fakerator from "lib/fakerator"; 8 | 9 | module.exports = function() { 10 | let locale = require("lib/locales/hu-HU"); 11 | let fbLocale = require("lib/locales/default"); 12 | 13 | // Merge locale and fallback 14 | locale = mergeWith(locale, fbLocale, (objValue) => { 15 | // DON'T MERGE ARRAYS 16 | if (isArray(objValue) || isFunction(objValue)) 17 | return objValue; 18 | 19 | if (!isNil(objValue) && !isObject(objValue)) 20 | return objValue; 21 | }); 22 | 23 | return new Fakerator(locale); 24 | }; -------------------------------------------------------------------------------- /lib/locales/hu-HU/company/index.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | name: [ 3 | "#{names.lastName} #{company.suffix}", 4 | "#{names.lastName} #{company.suffix}", 5 | "#{names.lastName} és társa #{company.suffix}", 6 | "#{names.lastName} és #{names.lastName} #{company.suffix}" 7 | ], 8 | 9 | suffix: [ 10 | "Kft.", 11 | "Bt.", 12 | "Zrt.", 13 | "Nyrt." 14 | ] 15 | }; -------------------------------------------------------------------------------- /lib/locales/hu-HU/index.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | _meta: { 3 | id: "hu-HU", 4 | fallback: null, 5 | language: "Hungarian", 6 | country: "Hungary", 7 | countryCode: "HU" 8 | }, 9 | 10 | names: require("./names"), 11 | phone: require("./phone"), 12 | address: require("./address"), 13 | company: require("./company"), 14 | internet: require("./internet") 15 | }; -------------------------------------------------------------------------------- /lib/locales/hu-HU/internet/index.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | tld: [ 3 | "hu" 4 | ], 5 | 6 | userName(firstName, lastName) { 7 | firstName = this.slugify(firstName ? firstName : this.populate("#{names.firstName}")).toLowerCase(); 8 | lastName = this.slugify(lastName ? lastName : this.populate("#{names.lastName}")).toLowerCase(); 9 | 10 | return this.populate(this.random.arrayElement([ 11 | `${lastName}.${firstName}`, 12 | `${lastName}.${firstName}##`, 13 | `${lastName}.${firstName}####`, 14 | `${lastName}_${firstName}`, 15 | `${lastName}_${firstName}##`, 16 | `${lastName}${firstName}##`, 17 | `${lastName}##` 18 | ])); 19 | }, 20 | 21 | domain() { 22 | return this.slugify(this.populate(this.random.arrayElement([ 23 | "#{names.lastName}", 24 | "#{names.lastName}#{names.firstName}", 25 | "#{names.lastName}-#{names.firstName}" 26 | ]))).toLowerCase() + "." + this.random.arrayElement(module.exports.tld); 27 | }, 28 | 29 | emailDomain: [ 30 | "gmail.com", 31 | "freemail.hu", 32 | "mailbox.hu" 33 | ], 34 | 35 | email(firstName, lastName, domain) { 36 | firstName = this.slugify(firstName ? firstName : this.populate("#{names.firstName}")).toLowerCase(); 37 | lastName = this.slugify(lastName ? lastName : this.populate("#{names.lastName}")).toLowerCase(); 38 | domain = domain ? domain : this.populate("#{internet.emailDomain}"); 39 | 40 | return [ 41 | `${lastName}.${firstName}@${domain}`, 42 | `${lastName}.${firstName}##@${domain}`, 43 | `${lastName}${firstName}##@${domain}`, 44 | `${lastName}##@${domain}` 45 | ]; 46 | } 47 | 48 | }; -------------------------------------------------------------------------------- /lib/locales/hu-HU/names/firstNameFemale.js: -------------------------------------------------------------------------------- 1 | module.exports = [ 2 | "Mária", 3 | "Erzsébet", 4 | "Katalin", 5 | "Ilona", 6 | "Éva", 7 | "Anna", 8 | "Zsuzsanna", 9 | "Margit", 10 | "Judit", 11 | "Ágnes", 12 | "Julianna", 13 | "Andrea", 14 | "Ildikó", 15 | "Erika", 16 | "Krisztina", 17 | "Irén", 18 | "Eszter", 19 | "Magdolna", 20 | "Mónika", 21 | "Edit", 22 | "Gabriella", 23 | "Szilvia", 24 | "Anita", 25 | "Anikó", 26 | "Viktória", 27 | "Márta", 28 | "Rozália", 29 | "Tímea", 30 | "Piroska", 31 | "Ibolya", 32 | "Klára", 33 | "Tünde", 34 | "Dóra", 35 | "Zsófia", 36 | "Gizella", 37 | "Veronika", 38 | "Alexandra", 39 | "Csilla", 40 | "Terézia", 41 | "Nikolett", 42 | "Melinda", 43 | "Adrienn", 44 | "Réka", 45 | "Beáta", 46 | "Marianna", 47 | "Nóra", 48 | "Renáta", 49 | "Vivien", 50 | "Barbara", 51 | "Enikő", 52 | "Bernadett", 53 | "Rita", 54 | "Brigitta", 55 | "Edina", 56 | "Hajnalka", 57 | "Gyöngyi", 58 | "Jolán", 59 | "Petra", 60 | "Orsolya", 61 | "Etelka", 62 | "Boglárka", 63 | "Borbála", 64 | "Noémi", 65 | "Valéria", 66 | "Teréz", 67 | "Annamária", 68 | "Fanni", 69 | "Kitti", 70 | "Nikoletta", 71 | "Emese", 72 | "Aranka", 73 | "Laura", 74 | "Lilla", 75 | "Róza", 76 | "Klaudia", 77 | "Anett", 78 | "Kinga", 79 | "Zita", 80 | "Beatrix", 81 | "Zsanett", 82 | "Rózsa", 83 | "Emma", 84 | "Dorina", 85 | "Hanna", 86 | "Lili", 87 | "Sára", 88 | "Irma", 89 | "Bianka", 90 | "Júlia", 91 | "Györgyi", 92 | "Henrietta", 93 | "Diána", 94 | "Luca", 95 | "Mariann", 96 | "Bettina", 97 | "Dorottya", 98 | "Virág", 99 | "Jázmin", 100 | "Sarolta", 101 | "Evelin" 102 | ]; 103 | -------------------------------------------------------------------------------- /lib/locales/hu-HU/names/firstNameMale.js: -------------------------------------------------------------------------------- 1 | module.exports = [ 2 | "László", 3 | "István", 4 | "József", 5 | "János", 6 | "Zoltán", 7 | "Sándor", 8 | "Gábor", 9 | "Ferenc", 10 | "Attila", 11 | "Péter", 12 | "Tamás", 13 | "Zsolt", 14 | "Tibor", 15 | "András", 16 | "Csaba", 17 | "Imre", 18 | "Lajos", 19 | "György", 20 | "Balázs", 21 | "Gyula", 22 | "Mihály", 23 | "Károly", 24 | "Róbert", 25 | "Béla", 26 | "Dávid", 27 | "Dániel", 28 | "Ádám", 29 | "Krisztián", 30 | "Miklós", 31 | "Norbert", 32 | "Bence", 33 | "Máté", 34 | "Pál", 35 | "Szabolcs", 36 | "Roland", 37 | "Gergő", 38 | "Antal", 39 | "Bálint", 40 | "Richárd", 41 | "Márk", 42 | "Levente", 43 | "Gergely", 44 | "Ákos", 45 | "Viktor", 46 | "Árpád", 47 | "Géza", 48 | "Márton", 49 | "Kristóf", 50 | "Jenő", 51 | "Kálmán", 52 | "Patrik", 53 | "Martin", 54 | "Milán", 55 | "Barnabás", 56 | "Dominik", 57 | "Marcell", 58 | "Ernő", 59 | "Mátyás", 60 | "Endre", 61 | "Áron", 62 | "Dezső", 63 | "Botond", 64 | "Nándor", 65 | "Zsombor", 66 | "Szilárd", 67 | "Erik", 68 | "Olivér", 69 | "Alex", 70 | "Vilmos", 71 | "Ottó", 72 | "Benedek", 73 | "Dénes", 74 | "Kornél", 75 | "Bertalan", 76 | "Benjámin", 77 | "Zalán", 78 | "Kevin", 79 | "Adrián", 80 | "Rudolf", 81 | "Albert", 82 | "Vince", 83 | "Ervin", 84 | "Győző", 85 | "Zsigmond", 86 | "Andor", 87 | "Gusztáv", 88 | "Szilveszter", 89 | "Iván", 90 | "Noel", 91 | "Barna", 92 | "Elemér", 93 | "Arnold", 94 | "Csongor", 95 | "Ábel", 96 | "Krisztofer", 97 | "Emil", 98 | "Tivadar", 99 | "Hunor", 100 | "Bendegúz", 101 | "Henrik" 102 | ]; 103 | -------------------------------------------------------------------------------- /lib/locales/hu-HU/names/index.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | // Male first name 3 | firstNameM: require("./firstNameMale"), 4 | 5 | // Femail first name 6 | firstNameF: require("./firstNameFemale"), 7 | 8 | // Male last name 9 | lastNameM: require("./lastName"), 10 | 11 | // Female last name 12 | lastNameF: require("./lastName"), 13 | 14 | prefix: [], 15 | 16 | suffix: [], 17 | 18 | nameM: [ 19 | "#{names.lastName} #{names.firstNameM}", 20 | "#{names.lastName} #{names.firstNameM}", 21 | "#{names.lastName} #{names.firstNameM} #{names.firstNameM}" 22 | ], 23 | 24 | nameF: [ 25 | "#{names.lastName} #{names.firstNameF}", 26 | "#{names.lastName} #{names.firstNameF}", 27 | "#{names.lastName} #{names.firstNameF} #{names.firstNameF}" 28 | ] 29 | 30 | }; -------------------------------------------------------------------------------- /lib/locales/hu-HU/names/lastName.js: -------------------------------------------------------------------------------- 1 | module.exports = [ 2 | "Nagy", 3 | "Kovács", 4 | "Tóth", 5 | "Szabó", 6 | "Horváth", 7 | "Varga", 8 | "Kiss", 9 | "Molnár", 10 | "Németh", 11 | "Farkas", 12 | "Balogh", 13 | "Papp", 14 | "Takács", 15 | "Juhász", 16 | "Lakatos", 17 | "Mészáros", 18 | "Oláh", 19 | "Simon", 20 | "Rácz", 21 | "Fekete", 22 | "Szilágyi", 23 | "Török", 24 | "Fehér", 25 | "Balázs", 26 | "Gál", 27 | "Kis", 28 | "Szűcs", 29 | "Kocsis", 30 | "Pintér", 31 | "Fodor", 32 | "Orsós", 33 | "Szalai", 34 | "Sipos", 35 | "Magyar", 36 | "Lukács", 37 | "Gulyás", 38 | "Bíró", 39 | "Király", 40 | "Katona", 41 | "László", 42 | "Jakab", 43 | "Bogdán", 44 | "Balog", 45 | "Sándor", 46 | "Boros", 47 | "Fazekas", 48 | "Kelemen", 49 | "Antal", 50 | "Somogyi", 51 | "Váradi", 52 | "Fülöp", 53 | "Orosz", 54 | "Vincze", 55 | "Veres", 56 | "Hegedűs", 57 | "Deák", 58 | "Budai", 59 | "Pap", 60 | "Bálint", 61 | "Pál", 62 | "Illés", 63 | "Szőke", 64 | "Vörös", 65 | "Vass", 66 | "Bognár", 67 | "Lengyel", 68 | "Fábián", 69 | "Bodnár", 70 | "Szücs", 71 | "Hajdu", 72 | "Halász", 73 | "Jónás", 74 | "Kozma", 75 | "Máté", 76 | "Székely", 77 | "Gáspár", 78 | "Pásztor", 79 | "Bakos", 80 | "Dudás", 81 | "Major", 82 | "Hegedüs", 83 | "Virág", 84 | "Orbán", 85 | "Novák", 86 | "Barna", 87 | "Soós", 88 | "Nemes", 89 | "Tamás", 90 | "Pataki", 91 | "Faragó", 92 | "Balla", 93 | "Borbély", 94 | "Kerekes", 95 | "Szekeres", 96 | "Barta", 97 | "Péter", 98 | "Csonka", 99 | "Mezei", 100 | "Dobos", 101 | "Márton" 102 | ]; 103 | -------------------------------------------------------------------------------- /lib/locales/hu-HU/phone/index.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | number: [ 3 | "06-20-###-####", 4 | "06-30-###-####", 5 | "06-70-###-####", 6 | "06-1-###-####", 7 | "06-##-###-###" 8 | ] 9 | }; -------------------------------------------------------------------------------- /lib/locales/it-IT/address/index.js: -------------------------------------------------------------------------------- 1 | import countries from "./countryWithCodes"; 2 | 3 | module.exports = { 4 | countryAndCode() { 5 | let country = this.random.objectElement(countries); 6 | return { 7 | code: Object.keys(country)[0], 8 | name: country[Object.keys(country)[0]] 9 | }; 10 | }, 11 | 12 | state: require("./state"), 13 | 14 | stateAbbr: require("./stateAbbr"), 15 | 16 | city: [ 17 | "#{address.cityPrefix} #{names.firstName} #{address.citySuffix}", 18 | "#{address.cityPrefix} #{names.firstName}", 19 | "#{names.firstName} #{address.citySuffix}", 20 | "#{names.lastName} #{address.citySuffix}" 21 | ], 22 | 23 | cityPrefix: [ 24 | "San", 25 | "Borgo", 26 | "Sesto", 27 | "Quarto", 28 | "Settimo" 29 | ], 30 | 31 | citySuffix: [ 32 | "a mare", 33 | "lido", 34 | "ligure", 35 | "del friuli", 36 | "salentino", 37 | "calabro", 38 | "veneto", 39 | "nell'emilia", 40 | "umbro", 41 | "laziale", 42 | "terme", 43 | "sardo" 44 | ], 45 | 46 | street: [ 47 | "#{address.streetName} #{address.buildingNumber}", 48 | "#{address.streetName} #{address.buildingNumber}, Appartamento ##", 49 | "#{address.streetName} #{address.buildingNumber}, Piano ##" 50 | ], 51 | 52 | streetName: [ 53 | "#{address.streetSuffix} #{names.firstName}", 54 | "#{address.streetSuffix} #{names.lastName}" 55 | ], 56 | 57 | streetPrefix: require("./streetPrefix"), 58 | 59 | buildingNumber: [ 60 | "###", 61 | "##", 62 | "#" 63 | ], 64 | 65 | postCode: [ 66 | "#####" 67 | ] 68 | 69 | }; -------------------------------------------------------------------------------- /lib/locales/it-IT/address/state.js: -------------------------------------------------------------------------------- 1 | module.exports = [ 2 | "Agrigento", 3 | "Alessandria", 4 | "Ancona", 5 | "Aosta", 6 | "Arezzo", 7 | "Ascoli Piceno", 8 | "Asti", 9 | "Avellino", 10 | "Bari", 11 | "Barletta-Andria-Trani", 12 | "Belluno", 13 | "Benevento", 14 | "Bergamo", 15 | "Biella", 16 | "Bologna", 17 | "Bolzano", 18 | "Brescia", 19 | "Brindisi", 20 | "Cagliari", 21 | "Caltanissetta", 22 | "Campobasso", 23 | "Carbonia-Iglesias", 24 | "Caserta", 25 | "Catania", 26 | "Catanzaro", 27 | "Chieti", 28 | "Como", 29 | "Cosenza", 30 | "Cremona", 31 | "Crotone", 32 | "Cuneo", 33 | "Enna", 34 | "Fermo", 35 | "Ferrara", 36 | "Firenze", 37 | "Foggia", 38 | "Forlì-Cesena", 39 | "Frosinone", 40 | "Genova", 41 | "Gorizia", 42 | "Grosseto", 43 | "Imperia", 44 | "Isernia", 45 | "La Spezia", 46 | "L'Aquila", 47 | "Latina", 48 | "Lecce", 49 | "Lecco", 50 | "Livorno", 51 | "Lodi", 52 | "Lucca", 53 | "Macerata", 54 | "Mantova", 55 | "Massa-Carrara", 56 | "Matera", 57 | "Messina", 58 | "Milano", 59 | "Modena", 60 | "Monza e della Brianza", 61 | "Napoli", 62 | "Novara", 63 | "Nuoro", 64 | "Olbia-Tempio", 65 | "Oristano", 66 | "Padova", 67 | "Palermo", 68 | "Parma", 69 | "Pavia", 70 | "Perugia", 71 | "Pesaro e Urbino", 72 | "Pescara", 73 | "Piacenza", 74 | "Pisa", 75 | "Pistoia", 76 | "Pordenone", 77 | "Potenza", 78 | "Prato", 79 | "Ragusa", 80 | "Ravenna", 81 | "Reggio Calabria", 82 | "Reggio Emilia", 83 | "Rieti", 84 | "Rimini", 85 | "Roma", 86 | "Rovigo", 87 | "Salerno", 88 | "Medio Campidano", 89 | "Sassari", 90 | "Savona", 91 | "Siena", 92 | "Siracusa", 93 | "Sondrio", 94 | "Taranto", 95 | "Teramo", 96 | "Terni", 97 | "Torino", 98 | "Ogliastra", 99 | "Trapani", 100 | "Trento", 101 | "Treviso", 102 | "Trieste", 103 | "Udine", 104 | "Varese", 105 | "Venezia", 106 | "Verbano-Cusio-Ossola", 107 | "Vercelli", 108 | "Verona", 109 | "Vibo Valentia", 110 | "Vicenza", 111 | "Viterbo" 112 | ]; 113 | -------------------------------------------------------------------------------- /lib/locales/it-IT/address/stateAbbr.js: -------------------------------------------------------------------------------- 1 | module.exports = [ 2 | "AG", 3 | "AL", 4 | "AN", 5 | "AO", 6 | "AR", 7 | "AP", 8 | "AT", 9 | "AV", 10 | "BA", 11 | "BT", 12 | "BL", 13 | "BN", 14 | "BG", 15 | "BI", 16 | "BO", 17 | "BZ", 18 | "BS", 19 | "BR", 20 | "CA", 21 | "CL", 22 | "CB", 23 | "CI", 24 | "CE", 25 | "CT", 26 | "CZ", 27 | "CH", 28 | "CO", 29 | "CS", 30 | "CR", 31 | "KR", 32 | "CN", 33 | "EN", 34 | "FM", 35 | "FE", 36 | "FI", 37 | "FG", 38 | "FC", 39 | "FR", 40 | "GE", 41 | "GO", 42 | "GR", 43 | "IM", 44 | "IS", 45 | "SP", 46 | "AQ", 47 | "LT", 48 | "LE", 49 | "LC", 50 | "LI", 51 | "LO", 52 | "LU", 53 | "MC", 54 | "MN", 55 | "MS", 56 | "MT", 57 | "ME", 58 | "MI", 59 | "MO", 60 | "MB", 61 | "NA", 62 | "NO", 63 | "NU", 64 | "OT", 65 | "OR", 66 | "PD", 67 | "PA", 68 | "PR", 69 | "PV", 70 | "PG", 71 | "PU", 72 | "PE", 73 | "PC", 74 | "PI", 75 | "PT", 76 | "PN", 77 | "PZ", 78 | "PO", 79 | "RG", 80 | "RA", 81 | "RC", 82 | "RE", 83 | "RI", 84 | "RN", 85 | "RM", 86 | "RO", 87 | "SA", 88 | "VS", 89 | "SS", 90 | "SV", 91 | "SI", 92 | "SR", 93 | "SO", 94 | "TA", 95 | "TE", 96 | "TR", 97 | "TO", 98 | "OG", 99 | "TP", 100 | "TN", 101 | "TV", 102 | "TS", 103 | "UD", 104 | "VA", 105 | "VE", 106 | "VB", 107 | "VC", 108 | "VR", 109 | "VV", 110 | "VI", 111 | "VT" 112 | ]; 113 | -------------------------------------------------------------------------------- /lib/locales/it-IT/address/streetPrefix.js: -------------------------------------------------------------------------------- 1 | module.exports = [ 2 | "Piazza", 3 | "Strada", 4 | "Via", 5 | "Borgo", 6 | "Contrada", 7 | "Rotonda", 8 | "Incrocio" 9 | ]; 10 | -------------------------------------------------------------------------------- /lib/locales/it-IT/build.js: -------------------------------------------------------------------------------- 1 | import isNil from "lodash/isNil"; 2 | import isArray from "lodash/isArray"; 3 | import isFunction from "lodash/isFunction"; 4 | import isObject from "lodash/isObject"; 5 | import mergeWith from "lodash/mergeWith"; 6 | 7 | import Fakerator from "lib/fakerator"; 8 | 9 | module.exports = function() { 10 | let locale = require("lib/locales/it-IT"); 11 | let fbLocale = require("lib/locales/default"); 12 | 13 | // Merge locale and fallback 14 | locale = mergeWith(locale, fbLocale, (objValue) => { 15 | // DON'T MERGE ARRAYS 16 | if (isArray(objValue) || isFunction(objValue)) 17 | return objValue; 18 | 19 | if (!isNil(objValue) && !isObject(objValue)) 20 | return objValue; 21 | }); 22 | 23 | return new Fakerator(locale); 24 | }; -------------------------------------------------------------------------------- /lib/locales/it-IT/company/index.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | name: [ 3 | "#{names.lastName} #{company.suffix}", 4 | "#{names.lastName}-#{names.lastName} #{company.suffix}", 5 | "#{names.lastName}, #{names.lastName} e #{names.lastName} #{company.suffix}" 6 | ], 7 | 8 | suffix: [ 9 | "SPA", 10 | "e figli", 11 | "Group", 12 | "s.r.l." 13 | ] 14 | }; -------------------------------------------------------------------------------- /lib/locales/it-IT/index.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | _meta: { 3 | id: "it-IT", 4 | fallback: null, 5 | language: "Italian", 6 | country: "Italy", 7 | countryCode: "IT" 8 | }, 9 | 10 | names: require("./names"), 11 | phone: require("./phone"), 12 | address: require("./address"), 13 | company: require("./company"), 14 | internet: require("./internet") 15 | }; -------------------------------------------------------------------------------- /lib/locales/it-IT/internet/index.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | tld: [ 3 | "com", 4 | "com", 5 | "com", 6 | "net", 7 | "org", 8 | "it", 9 | "it", 10 | "it" 11 | ], 12 | 13 | emailDomain: [ 14 | "gmail.com", 15 | "yahoo.com", 16 | "hotmail.com", 17 | "email.it", 18 | "libero.it", 19 | "yahoo.it" 20 | ] 21 | 22 | }; -------------------------------------------------------------------------------- /lib/locales/it-IT/names/index.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | // Male first name 3 | firstNameM: require("./firstName"), 4 | 5 | // Femail first name 6 | firstNameF: require("./firstName"), 7 | 8 | // Male last name 9 | lastNameM: require("./lastName"), 10 | 11 | // Female last name 12 | lastNameF: require("./lastName"), 13 | 14 | prefix: [ 15 | "Sig.", 16 | "Dott.", 17 | "Dr.", 18 | "Ing." 19 | ], 20 | 21 | suffix: [], 22 | 23 | name: [ 24 | "#{names.prefix} #{names.firstName} #{names.lastName}", 25 | "#{names.firstName} #{names.lastName}", 26 | "#{names.firstName} #{names.lastName}", 27 | "#{names.firstName} #{names.lastName}", 28 | "#{names.firstName} #{names.lastName}", 29 | "#{names.firstName} #{names.lastName}" 30 | ], 31 | 32 | nameM: module.exports.name, 33 | nameF: module.exports.name 34 | 35 | }; -------------------------------------------------------------------------------- /lib/locales/it-IT/names/lastName.js: -------------------------------------------------------------------------------- 1 | module.exports = [ 2 | "Amato", 3 | "Barbieri", 4 | "Barone", 5 | "Basile", 6 | "Battaglia", 7 | "Bellini", 8 | "Benedetti", 9 | "Bernardi", 10 | "Bianc", 11 | "Bianchi", 12 | "Bruno", 13 | "Caputo", 14 | "Carbon", 15 | "Caruso", 16 | "Cattaneo", 17 | "Colombo", 18 | "Cont", 19 | "Conte", 20 | "Coppola", 21 | "Costa", 22 | "Costantin", 23 | "D'amico", 24 | "D'angelo", 25 | "Damico", 26 | "De Angelis", 27 | "De luca", 28 | "De rosa", 29 | "De Santis", 30 | "Donati", 31 | "Esposito", 32 | "Fabbri", 33 | "Farin", 34 | "Ferrara", 35 | "Ferrari", 36 | "Ferraro", 37 | "Ferretti", 38 | "Ferri", 39 | "Fior", 40 | "Fontana", 41 | "Galli", 42 | "Gallo", 43 | "Gatti", 44 | "Gentile", 45 | "Giordano", 46 | "Giuliani", 47 | "Grassi", 48 | "Grasso", 49 | "Greco", 50 | "Guerra", 51 | "Leone", 52 | "Lombardi", 53 | "Lombardo", 54 | "Longo", 55 | "Mancini", 56 | "Marchetti", 57 | "Marian", 58 | "Marini", 59 | "Marino", 60 | "Martinelli", 61 | "Martini", 62 | "Martino", 63 | "Mazza", 64 | "Messina", 65 | "Milani", 66 | "Montanari", 67 | "Monti", 68 | "Morelli", 69 | "Moretti", 70 | "Negri", 71 | "Neri", 72 | "Orlando", 73 | "Pagano", 74 | "Palmieri", 75 | "Palumbo", 76 | "Parisi", 77 | "Pellegrini", 78 | "Pellegrino", 79 | "Piras", 80 | "Ricci", 81 | "Rinaldi", 82 | "Riva", 83 | "Rizzi", 84 | "Rizzo", 85 | "Romano", 86 | "Ross", 87 | "Rossetti", 88 | "Ruggiero", 89 | "Russo", 90 | "Sala", 91 | "Sanna", 92 | "Santoro", 93 | "Sartori", 94 | "Serr", 95 | "Silvestri", 96 | "Sorrentino", 97 | "Testa", 98 | "Valentini", 99 | "Villa", 100 | "Vitale", 101 | "Vitali" 102 | ]; 103 | -------------------------------------------------------------------------------- /lib/locales/it-IT/phone/index.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | number: [ 3 | "+## ### ## ## ####", 4 | "+## ## #######", 5 | "+## ## ########", 6 | "+## ### #######", 7 | "+## ### ########", 8 | "+## #### #######", 9 | "+## #### ########", 10 | "0## ### ####", 11 | "+39 0## ### ###", 12 | "3## ### ###", 13 | "+39 3## ### ###" 14 | ] 15 | }; -------------------------------------------------------------------------------- /lib/locales/locale-build.js: -------------------------------------------------------------------------------- 1 | import isNil from "lodash/isNil"; 2 | import isArray from "lodash/isArray"; 3 | import isFunction from "lodash/isFunction"; 4 | import isObject from "lodash/isObject"; 5 | import mergeWith from "lodash/mergeWith"; 6 | 7 | import Fakerator from "lib/fakerator"; 8 | 9 | module.exports = function() { 10 | let locale = require("lib/locales/%%LOCALEID%%"); 11 | let fbLocale = require("lib/locales/%%FALLBACKID%%"); 12 | 13 | // Merge locale and fallback 14 | locale = mergeWith(locale, fbLocale, (objValue) => { 15 | // DON'T MERGE ARRAYS 16 | if (isArray(objValue) || isFunction(objValue)) 17 | return objValue; 18 | 19 | if (!isNil(objValue) && !isObject(objValue)) 20 | return objValue; 21 | }); 22 | 23 | return new Fakerator(locale); 24 | }; -------------------------------------------------------------------------------- /lib/locales/nb-NO/address/index.js: -------------------------------------------------------------------------------- 1 | import countries from "./countryWithCodes"; 2 | 3 | module.exports = { 4 | countryAndCode() { 5 | let country = this.random.objectElement(countries); 6 | return { 7 | code: Object.keys(country)[0], 8 | name: country[Object.keys(country)[0]] 9 | }; 10 | }, 11 | 12 | state: [ 13 | ], 14 | 15 | stateAbbr: [ 16 | ], 17 | 18 | city: [ 19 | "#{address.cityName}#{address.citySuffix}" 20 | ], 21 | 22 | cityName: [ 23 | "Fet", 24 | "Gjes", 25 | "Høy", 26 | "Inn", 27 | "Fager", 28 | "Lille", 29 | "Lo", 30 | "Mal", 31 | "Nord", 32 | "Nær", 33 | "Sand", 34 | "Sme", 35 | "Stav", 36 | "Stor", 37 | "Tand", 38 | "Ut", 39 | "Vest" 40 | ], 41 | 42 | citySuffix: [ 43 | "berg", 44 | "borg", 45 | "by", 46 | "bø", 47 | "dal", 48 | "eid", 49 | "fjell", 50 | "fjord", 51 | "foss", 52 | "grunn", 53 | "hamn", 54 | "havn", 55 | "helle", 56 | "mark", 57 | "nes", 58 | "odden", 59 | "sand", 60 | "sjøen", 61 | "stad", 62 | "strand", 63 | "strøm", 64 | "sund", 65 | "vik", 66 | "vær", 67 | "våg", 68 | "ø", 69 | "øy", 70 | "ås" 71 | ], 72 | 73 | street: [ 74 | "#{address.streetName}#{address.streetSuffix}", 75 | "#{address.streetPrefix} #{address.streetName}#{address.streetSuffix}", 76 | "#{names.firstName}#{address.commonStreetSuffix}", 77 | "#{names.lastName}#{address.commonStreetSuffix}" 78 | ], 79 | 80 | streetName: require("./streetName"), 81 | 82 | streetPrefix: [ 83 | "Øvre", 84 | "Nedre", 85 | "Søndre", 86 | "Gamle", 87 | "Østre", 88 | "Vestre" 89 | ], 90 | 91 | streetSuffix: require("./streetSuffix"), 92 | 93 | commonStreetSuffix: [ 94 | "sgate", 95 | "svei", 96 | "s Gate", 97 | "s Vei", 98 | "gata", 99 | "veien" 100 | ], 101 | 102 | buildingNumber: [ 103 | "#", 104 | "##" 105 | ], 106 | 107 | postCode: [ 108 | "####", 109 | "####", 110 | "####", 111 | "0###" 112 | ] 113 | 114 | }; -------------------------------------------------------------------------------- /lib/locales/nb-NO/address/streetName.js: -------------------------------------------------------------------------------- 1 | module.exports = [ 2 | "Eike", 3 | "Bjørke", 4 | "Gran", 5 | "Vass", 6 | "Furu", 7 | "Litj", 8 | "Lille", 9 | "Høy", 10 | "Fosse", 11 | "Elve", 12 | "Ku", 13 | "Konvall", 14 | "Soldugg", 15 | "Hestemyr", 16 | "Granitt", 17 | "Hegge", 18 | "Rogne", 19 | "Fiol", 20 | "Sol", 21 | "Ting", 22 | "Malm", 23 | "Klokker", 24 | "Preste", 25 | "Dam", 26 | "Geiterygg", 27 | "Bekke", 28 | "Berg", 29 | "Kirke", 30 | "Kors", 31 | "Bru", 32 | "Blåveis", 33 | "Torg", 34 | "Sjø" 35 | ]; 36 | -------------------------------------------------------------------------------- /lib/locales/nb-NO/address/streetSuffix.js: -------------------------------------------------------------------------------- 1 | module.exports = [ 2 | "alléen", 3 | "bakken", 4 | "berget", 5 | "bråten", 6 | "eggen", 7 | "engen", 8 | "ekra", 9 | "faret", 10 | "flata", 11 | "gata", 12 | "gjerdet", 13 | "grenda", 14 | "gropa", 15 | "hagen", 16 | "haugen", 17 | "havna", 18 | "holtet", 19 | "høgda", 20 | "jordet", 21 | "kollen", 22 | "kroken", 23 | "lia", 24 | "lunden", 25 | "lyngen", 26 | "løkka", 27 | "marka", 28 | "moen", 29 | "myra", 30 | "plassen", 31 | "ringen", 32 | "roa", 33 | "røa", 34 | "skogen", 35 | "skrenten", 36 | "spranget", 37 | "stien", 38 | "stranda", 39 | "stubben", 40 | "stykket", 41 | "svingen", 42 | "tjernet", 43 | "toppen", 44 | "tunet", 45 | "vollen", 46 | "vika", 47 | "åsen" 48 | ]; 49 | -------------------------------------------------------------------------------- /lib/locales/nb-NO/build.js: -------------------------------------------------------------------------------- 1 | import isNil from "lodash/isNil"; 2 | import isArray from "lodash/isArray"; 3 | import isFunction from "lodash/isFunction"; 4 | import isObject from "lodash/isObject"; 5 | import mergeWith from "lodash/mergeWith"; 6 | 7 | import Fakerator from "lib/fakerator"; 8 | 9 | module.exports = function() { 10 | let locale = require("lib/locales/nb-NO"); 11 | let fbLocale = require("lib/locales/default"); 12 | 13 | // Merge locale and fallback 14 | locale = mergeWith(locale, fbLocale, (objValue) => { 15 | // DON'T MERGE ARRAYS 16 | if (isArray(objValue) || isFunction(objValue)) 17 | return objValue; 18 | 19 | if (!isNil(objValue) && !isObject(objValue)) 20 | return objValue; 21 | }); 22 | 23 | return new Fakerator(locale); 24 | }; -------------------------------------------------------------------------------- /lib/locales/nb-NO/company/index.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | name: [ 3 | "#{names.lastName} #{company.suffix}", 4 | "#{names.lastName}-#{company.suffix}", 5 | "#{names.lastName}, #{names.lastName} og #{names.lastName}" 6 | ], 7 | 8 | suffix: [ 9 | "Gruppen", 10 | "AS", 11 | "ASA", 12 | "BA", 13 | "RFH", 14 | "og Sønner" 15 | ] 16 | }; -------------------------------------------------------------------------------- /lib/locales/nb-NO/index.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | _meta: { 3 | id: "nb-NO", 4 | fallback: null, 5 | language: "Norwegian", 6 | country: "Norway", 7 | countryCode: "NO" 8 | }, 9 | 10 | names: require("./names"), 11 | phone: require("./phone"), 12 | address: require("./address"), 13 | company: require("./company"), 14 | internet: require("./internet") 15 | }; -------------------------------------------------------------------------------- /lib/locales/nb-NO/internet/index.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | tld: [ 3 | "no", 4 | "com", 5 | "net", 6 | "org" 7 | ] 8 | 9 | }; -------------------------------------------------------------------------------- /lib/locales/nb-NO/names/firstNameF.js: -------------------------------------------------------------------------------- 1 | module.exports = [ 2 | "Emma", 3 | "Sara", 4 | "Thea", 5 | "Ida", 6 | "Julie", 7 | "Nora", 8 | "Emilie", 9 | "Ingrid", 10 | "Hanna", 11 | "Maria", 12 | "Sofie", 13 | "Anna", 14 | "Malin", 15 | "Amalie", 16 | "Vilde", 17 | "Frida", 18 | "Andrea", 19 | "Tuva", 20 | "Victoria", 21 | "Mia", 22 | "Karoline", 23 | "Mathilde", 24 | "Martine", 25 | "Linnea", 26 | "Marte", 27 | "Hedda", 28 | "Marie", 29 | "Helene", 30 | "Silje", 31 | "Leah", 32 | "Maja", 33 | "Elise", 34 | "Oda", 35 | "Kristine", 36 | "Aurora", 37 | "Kaja", 38 | "Camilla", 39 | "Mari", 40 | "Maren", 41 | "Mina", 42 | "Selma", 43 | "Jenny", 44 | "Celine", 45 | "Eline", 46 | "Sunniva", 47 | "Natalie", 48 | "Tiril", 49 | "Synne", 50 | "Sandra", 51 | "Madeleine" 52 | ]; 53 | -------------------------------------------------------------------------------- /lib/locales/nb-NO/names/firstNameM.js: -------------------------------------------------------------------------------- 1 | module.exports = [ 2 | "Markus", 3 | "Mathias", 4 | "Kristian", 5 | "Jonas", 6 | "Andreas", 7 | "Alexander", 8 | "Martin", 9 | "Sander", 10 | "Daniel", 11 | "Magnus", 12 | "Henrik", 13 | "Tobias", 14 | "Kristoffer", 15 | "Emil", 16 | "Adrian", 17 | "Sebastian", 18 | "Marius", 19 | "Elias", 20 | "Fredrik", 21 | "Thomas", 22 | "Sondre", 23 | "Benjamin", 24 | "Jakob", 25 | "Oliver", 26 | "Lucas", 27 | "Oskar", 28 | "Nikolai", 29 | "Filip", 30 | "Mats", 31 | "William", 32 | "Erik", 33 | "Simen", 34 | "Ole", 35 | "Eirik", 36 | "Isak", 37 | "Kasper", 38 | "Noah", 39 | "Lars", 40 | "Joakim", 41 | "Johannes", 42 | "Håkon", 43 | "Sindre", 44 | "Jørgen", 45 | "Herman", 46 | "Anders", 47 | "Jonathan", 48 | "Even", 49 | "Theodor", 50 | "Mikkel", 51 | "Aksel" 52 | ]; 53 | -------------------------------------------------------------------------------- /lib/locales/nb-NO/names/index.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | // Male first name 3 | firstNameM: require("./firstNameM"), 4 | 5 | // Femail first name 6 | firstNameF: require("./firstNameF"), 7 | 8 | // Male last name 9 | lastNameM: require("./lastName"), 10 | 11 | // Female last name 12 | lastNameF: require("./lastName"), 13 | 14 | prefix: [ 15 | "Dr.", 16 | "Prof." 17 | ], 18 | 19 | suffix: [], 20 | 21 | nameM: [ 22 | "#{names.prefix} #{names.firstNameM} #{names.lastNameM}", 23 | "#{names.firstNameM} #{names.firstNameM} #{names.lastNameM}", 24 | "#{names.firstNameM} #{names.lastNameM} #{names.lastNameM}", 25 | "#{names.firstNameM} #{names.lastNameM}", 26 | "#{names.firstNameM} #{names.lastNameM}", 27 | "#{names.firstNameM} #{names.lastNameM}" 28 | ], 29 | 30 | nameF: [ 31 | "#{names.prefix} #{names.firstNameM} #{names.lastNameF}", 32 | "#{names.firstNameF} #{names.firstNameF} #{names.lastNameF}", 33 | "#{names.firstNameF} #{names.lastNameF} #{names.lastNameF}", 34 | "#{names.firstNameF} #{names.lastNameF}", 35 | "#{names.firstNameF} #{names.lastNameF}", 36 | "#{names.firstNameF} #{names.lastNameF}" 37 | ] 38 | 39 | }; -------------------------------------------------------------------------------- /lib/locales/nb-NO/names/lastName.js: -------------------------------------------------------------------------------- 1 | module.exports = [ 2 | "Johansen", 3 | "Hansen", 4 | "Andersen", 5 | "Kristiansen", 6 | "Larsen", 7 | "Olsen", 8 | "Solberg", 9 | "Andresen", 10 | "Pedersen", 11 | "Nilsen", 12 | "Berg", 13 | "Halvorsen", 14 | "Karlsen", 15 | "Svendsen", 16 | "Jensen", 17 | "Haugen", 18 | "Martinsen", 19 | "Eriksen", 20 | "Sørensen", 21 | "Johnsen", 22 | "Myhrer", 23 | "Johannessen", 24 | "Nielsen", 25 | "Hagen", 26 | "Pettersen", 27 | "Bakke", 28 | "Skuterud", 29 | "Løken", 30 | "Gundersen", 31 | "Strand", 32 | "Jørgensen", 33 | "Kvarme", 34 | "Røed", 35 | "Sæther", 36 | "Stensrud", 37 | "Moe", 38 | "Kristoffersen", 39 | "Jakobsen", 40 | "Holm", 41 | "Aas", 42 | "Lie", 43 | "Moen", 44 | "Andreassen", 45 | "Vedvik", 46 | "Nguyen", 47 | "Jacobsen", 48 | "Torgersen", 49 | "Ruud", 50 | "Krogh", 51 | "Christiansen", 52 | "Bjerke", 53 | "Aalerud", 54 | "Borge", 55 | "Sørlie", 56 | "Berge", 57 | "Østli", 58 | "Ødegård", 59 | "Torp", 60 | "Henriksen", 61 | "Haukelidsæter", 62 | "Fjeld", 63 | "Danielsen", 64 | "Aasen", 65 | "Fredriksen", 66 | "Dahl", 67 | "Berntsen", 68 | "Arnesen", 69 | "Wold", 70 | "Thoresen", 71 | "Solheim", 72 | "Skoglund", 73 | "Bakken", 74 | "Amundsen", 75 | "Solli", 76 | "Smogeli", 77 | "Kristensen", 78 | "Glosli", 79 | "Fossum", 80 | "Evensen", 81 | "Eide", 82 | "Carlsen", 83 | "Østby", 84 | "Vegge", 85 | "Tangen", 86 | "Smedsrud", 87 | "Olstad", 88 | "Lunde", 89 | "Kleven", 90 | "Huseby", 91 | "Bjørnstad", 92 | "Ryan", 93 | "Rasmussen", 94 | "Nygård", 95 | "Nordskaug", 96 | "Nordby", 97 | "Mathisen", 98 | "Hopland", 99 | "Gran", 100 | "Finstad", 101 | "Edvardsen" 102 | ]; 103 | -------------------------------------------------------------------------------- /lib/locales/nb-NO/phone/index.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | number: [ 3 | "########", 4 | "## ## ## ##", 5 | "### ## ###", 6 | "+47 ## ## ## ##" 7 | ] 8 | }; -------------------------------------------------------------------------------- /lib/locales/pl-PL/address/index.js: -------------------------------------------------------------------------------- 1 | import countries from "./countryWithCodes"; 2 | 3 | module.exports = { 4 | countryAndCode() { 5 | let country = this.random.objectElement(countries); 6 | return { 7 | code: Object.keys(country)[0], 8 | name: country[Object.keys(country)[0]] 9 | }; 10 | }, 11 | 12 | state: [ 13 | "Dolnośląskie", 14 | "Kujawsko-pomorskie", 15 | "Lubelskie", 16 | "Lubuskie", 17 | "Łódzkie", 18 | "Małopolskie", 19 | "Mazowieckie", 20 | "Opolskie", 21 | "Podkarpackie", 22 | "Podlaskie", 23 | "Pomorskie", 24 | "Śląskie", 25 | "Świętokrzyskie", 26 | "Warmińsko-mazurskie", 27 | "Wielkopolskie", 28 | "Zachodniopomorskie" 29 | ], 30 | stateAbbr: [ 31 | "DŚ", 32 | "KP", 33 | "LB", 34 | "LS", 35 | "ŁD", 36 | "MP", 37 | "MZ", 38 | "OP", 39 | "PK", 40 | "PL", 41 | "PM", 42 | "ŚL", 43 | "ŚK", 44 | "WM", 45 | "WP", 46 | "ZP" 47 | ], 48 | 49 | city: require("./cityName"), 50 | 51 | street: [ 52 | "#{address.streetName} #{address.buildingNumber}" 53 | ], 54 | 55 | streetName: [ 56 | "#{address.streetPrefix} #{names.lastName}" 57 | ], 58 | 59 | streetPrefix: [ 60 | "ul.", 61 | "al." 62 | ], 63 | 64 | buildingNumber: [ 65 | "#####", 66 | "####", 67 | "###" 68 | ], 69 | 70 | postCode: [ 71 | "##-###" 72 | ] 73 | 74 | }; -------------------------------------------------------------------------------- /lib/locales/pl-PL/address/streetSuffix.js: -------------------------------------------------------------------------------- 1 | module.exports = [ 2 | "Aldea", 3 | "Apartamento", 4 | "Arrabal", 5 | "Arroyo", 6 | "Avenida", 7 | "Bajada", 8 | "Barranco", 9 | "Barrio", 10 | "Bloque", 11 | "Calle", 12 | "Calleja", 13 | "Camino", 14 | "Carretera", 15 | "Caserio", 16 | "Colegio", 17 | "Colonia", 18 | "Conjunto", 19 | "Cuesta", 20 | "Chalet", 21 | "Edificio", 22 | "Entrada", 23 | "Escalinata", 24 | "Explanada", 25 | "Extramuros", 26 | "Extrarradio", 27 | "Ferrocarril", 28 | "Glorieta", 29 | "Gran Subida", 30 | "Grupo", 31 | "Huerta", 32 | "Jardines", 33 | "Lado", 34 | "Lugar", 35 | "Manzana", 36 | "Masía", 37 | "Mercado", 38 | "Monte", 39 | "Muelle", 40 | "Municipio", 41 | "Parcela", 42 | "Parque", 43 | "Partida", 44 | "Pasaje", 45 | "Paseo", 46 | "Plaza", 47 | "Poblado", 48 | "Polígono", 49 | "Prolongación", 50 | "Puente", 51 | "Puerta", 52 | "Quinta", 53 | "Ramal", 54 | "Rambla", 55 | "Rampa", 56 | "Riera", 57 | "Rincón", 58 | "Ronda", 59 | "Rua", 60 | "Salida", 61 | "Sector", 62 | "Sección", 63 | "Senda", 64 | "Solar", 65 | "Subida", 66 | "Terrenos", 67 | "Torrente", 68 | "Travesía", 69 | "Urbanización", 70 | "Vía", 71 | "Vía Pública" 72 | ]; 73 | -------------------------------------------------------------------------------- /lib/locales/pl-PL/build.js: -------------------------------------------------------------------------------- 1 | import isNil from "lodash/isNil"; 2 | import isArray from "lodash/isArray"; 3 | import isFunction from "lodash/isFunction"; 4 | import isObject from "lodash/isObject"; 5 | import mergeWith from "lodash/mergeWith"; 6 | 7 | import Fakerator from "lib/fakerator"; 8 | 9 | module.exports = function() { 10 | let locale = require("lib/locales/pl-PL"); 11 | let fbLocale = require("lib/locales/default"); 12 | 13 | // Merge locale and fallback 14 | locale = mergeWith(locale, fbLocale, (objValue) => { 15 | // DON'T MERGE ARRAYS 16 | if (isArray(objValue) || isFunction(objValue)) 17 | return objValue; 18 | 19 | if (!isNil(objValue) && !isObject(objValue)) 20 | return objValue; 21 | }); 22 | 23 | return new Fakerator(locale); 24 | }; -------------------------------------------------------------------------------- /lib/locales/pl-PL/company/index.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | }; -------------------------------------------------------------------------------- /lib/locales/pl-PL/index.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | _meta: { 3 | id: "pl-PL", 4 | fallback: null, 5 | language: "Polish", 6 | country: "Poland", 7 | countryCode: "PL" 8 | }, 9 | 10 | names: require("./names"), 11 | phone: require("./phone"), 12 | address: require("./address"), 13 | company: require("./company"), 14 | internet: require("./internet") 15 | }; -------------------------------------------------------------------------------- /lib/locales/pl-PL/internet/index.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | tld: [ 3 | "com", 4 | "pl", 5 | "com.pl", 6 | "net", 7 | "org" 8 | ] 9 | 10 | }; -------------------------------------------------------------------------------- /lib/locales/pl-PL/names/index.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | // Male first name 3 | firstNameM: require("./firstName"), 4 | 5 | // Femail first name 6 | firstNameF: require("./firstName"), 7 | 8 | // Male last name 9 | lastNameM: require("./lastName"), 10 | 11 | // Female last name 12 | lastNameF: require("./lastName"), 13 | 14 | prefix: [ 15 | "Pan", 16 | "Pani" 17 | ], 18 | 19 | suffix: [], 20 | 21 | name: [ 22 | "#{names.prefix} #{names.firstName} #{names.lastName}", 23 | "#{names.firstName} #{names.lastName}", 24 | "#{names.firstName} #{names.lastName}", 25 | "#{names.firstName} #{names.lastName}", 26 | "#{names.firstName} #{names.lastName}", 27 | "#{names.firstName} #{names.lastName}" 28 | ], 29 | 30 | nameM: module.exports.name, 31 | nameF: module.exports.name 32 | 33 | }; -------------------------------------------------------------------------------- /lib/locales/pl-PL/phone/index.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | number: [ 3 | "9##-###-###", 4 | "9##.###.###", 5 | "9## ### ###", 6 | "9########" 7 | ] 8 | }; -------------------------------------------------------------------------------- /lib/locales/pt-BR/address/index.js: -------------------------------------------------------------------------------- 1 | import countries from "./countryWithCodes"; 2 | 3 | module.exports = { 4 | countryAndCode() { 5 | let country = this.random.objectElement(countries); 6 | return { 7 | code: Object.keys(country)[0], 8 | name: country[Object.keys(country)[0]] 9 | }; 10 | }, 11 | 12 | geoLocation() { 13 | return { 14 | latitude: (this.random.number(180 * 10000) / 10000.0 - 90.0), 15 | longitude: (this.random.number(360 * 10000) / 10000.0 - 180.0) 16 | }; 17 | }, 18 | 19 | state: [ 20 | "Acre", 21 | "Alagoas", 22 | "Amazonas", 23 | "Amapá", 24 | "Bahia", 25 | "Ceará", 26 | "Distrito Federal", 27 | "Espírito Santo", 28 | "Goiás", 29 | "Maranhão", 30 | "Minas Gerais", 31 | "Mato Grosso do Sul", 32 | "Mato Grosso", 33 | "Pará", 34 | "Paraíba", 35 | "Pernambuco", 36 | "Piauí", 37 | "Paraná", 38 | "Rio de Janeiro", 39 | "Rio Grande do Norte", 40 | "Rondônia", 41 | "Roraima", 42 | "Rio Grande do Sul", 43 | "Santa Catarina", 44 | "Sergipe", 45 | "São Paulo", 46 | "Tocantins", 47 | ], 48 | 49 | stateAbbr: [ 50 | "AC", 51 | "AL", 52 | "AM", 53 | "AP", 54 | "BA", 55 | "CE", 56 | "DF", 57 | "ES", 58 | "GO", 59 | "MA", 60 | "MG", 61 | "MS", 62 | "MT", 63 | "PA", 64 | "PB", 65 | "PE", 66 | "PI", 67 | "PR", 68 | "RJ", 69 | "RN", 70 | "RO", 71 | "RR", 72 | "RS", 73 | "SC", 74 | "SE", 75 | "SP", 76 | "TO", 77 | ], 78 | 79 | postCode: [ 80 | "#####-###" 81 | ], 82 | 83 | street: [ 84 | "#{address.streetName} #{address.buildingNumber}", 85 | "#{address.streetName} #{address.buildingNumber}", 86 | "#{address.streetName} #{address.buildingNumber} Apto ###", 87 | "#{address.streetName} #{address.buildingNumber} Casa ###" 88 | ], 89 | 90 | streetName: [ 91 | "#{address.streetSuffix} #{names.firstName}", 92 | "#{address.streetSuffix} #{names.lastName}" 93 | ], 94 | 95 | streetSuffix: [ 96 | "Alameda", 97 | "Avenida", 98 | "Praça", 99 | "Rodovia", 100 | "Rua", 101 | ], 102 | }; 103 | -------------------------------------------------------------------------------- /lib/locales/pt-BR/build.js: -------------------------------------------------------------------------------- 1 | import isNil from "lodash/isNil"; 2 | import isArray from "lodash/isArray"; 3 | import isFunction from "lodash/isFunction"; 4 | import isObject from "lodash/isObject"; 5 | import mergeWith from "lodash/mergeWith"; 6 | 7 | import Fakerator from "lib/fakerator"; 8 | 9 | module.exports = function() { 10 | let locale = require("lib/locales/pt-BR"); 11 | let fbLocale = require("lib/locales/default"); 12 | 13 | // Merge locale and fallback 14 | locale = mergeWith(locale, fbLocale, (objValue) => { 15 | // DON'T MERGE ARRAYS 16 | if (isArray(objValue) || isFunction(objValue)) 17 | return objValue; 18 | 19 | if (!isNil(objValue) && !isObject(objValue)) 20 | return objValue; 21 | }); 22 | 23 | return new Fakerator(locale); 24 | }; -------------------------------------------------------------------------------- /lib/locales/pt-BR/company/index.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | name: [ 3 | "#{company.preffix} #{names.lastName}", 4 | "#{names.lastName} #{company.suffix}", 5 | "#{names.lastName}-#{names.lastName} #{company.suffix}", 6 | "#{names.lastName}, #{names.lastName} and #{names.lastName} #{company.suffix}" 7 | ], 8 | 9 | suffix: [ 10 | "", 11 | "Ltda", 12 | "ME", 13 | ], 14 | 15 | preffix: [ 16 | "", 17 | "Grupo", 18 | "Associacao", 19 | ], 20 | }; -------------------------------------------------------------------------------- /lib/locales/pt-BR/date/index.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | month: [ 3 | "Janeiro", 4 | "Fevereiro", 5 | "Março", 6 | "Abril", 7 | "Maio", 8 | "Junho", 9 | "Julho", 10 | "Agosto", 11 | "Setembro", 12 | "Outubro", 13 | "Novembro", 14 | "Dezembro" 15 | ], 16 | 17 | weekday: [ 18 | "Domingo", 19 | "Segunda", 20 | "Terça", 21 | "Quarta", 22 | "Quinta", 23 | "Sexta", 24 | "Sábado" 25 | ], 26 | 27 | weekdayShort: [ 28 | "Dom", 29 | "Seg", 30 | "Ter", 31 | "Qua", 32 | "Qui", 33 | "Sex", 34 | "Sáb" 35 | ], 36 | 37 | weekdayMin: [ 38 | "Do", 39 | "Se", 40 | "Te", 41 | "Qa", 42 | "Qi", 43 | "Se", 44 | "Sa" 45 | ], 46 | }; -------------------------------------------------------------------------------- /lib/locales/pt-BR/index.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | _meta: { 3 | id: "pt-BR", 4 | fallback: null, 5 | language: "Portugues (Brazil)", 6 | country: "Brazil", 7 | countryCode: "BR" 8 | }, 9 | 10 | address: require("./address"), 11 | company: require("./company"), 12 | internet: require("./internet"), 13 | names: require("./names"), 14 | phone: require("./phone"), 15 | }; -------------------------------------------------------------------------------- /lib/locales/pt-BR/internet/index.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | tld: [ 3 | "br", 4 | "net", 5 | "com", 6 | "com.br", 7 | "com.br", 8 | "com.br", 9 | ], 10 | 11 | imageCategories: [ 12 | "animais", 13 | "comércio", 14 | "cidades", 15 | "comida", 16 | "esportes", 17 | "gatos", 18 | "lazer", 19 | "natureza", 20 | "pessoas", 21 | "transporte", 22 | "vestuário", 23 | "viagem", 24 | ], 25 | }; -------------------------------------------------------------------------------- /lib/locales/pt-BR/names/firstNameFemale.js: -------------------------------------------------------------------------------- 1 | module.exports = [ 2 | "Abril", 3 | "Adriana", 4 | "Agustina", 5 | "Alessandra", 6 | "Alexa", 7 | "Allison", 8 | "Alma", 9 | "Amanda", 10 | "Amélia", 11 | "Ana", 12 | "Andrea", 13 | "Antonieta", 14 | "Ariadna", 15 | "Ariana", 16 | "Ashley", 17 | "Beatriz", 18 | "Bianca", 19 | "Camila", 20 | "Carla", 21 | "Carolina", 22 | "Catarina", 23 | "Clara", 24 | "Daniela", 25 | "Elizabeth", 26 | "Emília", 27 | "Fabiana", 28 | "Fátima", 29 | "Gabriela", 30 | "Giovana", 31 | "Helena", 32 | "Irene", 33 | "Isabel", 34 | "Isabella", 35 | "Isadora", 36 | "Ivana", 37 | "Jasmin", 38 | "Joana", 39 | "Josefina", 40 | "Juliana", 41 | "Julieta", 42 | "Júlia", 43 | "Ketlin", 44 | "Laura", 45 | "Luana", 46 | "Luara", 47 | "Luciana", 48 | "Luna", 49 | "Luzia", 50 | "Madalena", 51 | "Maitê", 52 | "Malena", 53 | "Manuela", 54 | "Mariana", 55 | "Mel", 56 | "Melissa", 57 | "Mia", 58 | "Micaela", 59 | "Michele", 60 | "Miranda", 61 | "Natália", 62 | "Nicole", 63 | "Noelí", 64 | "Norma", 65 | "Nádia", 66 | "Olívia", 67 | "Ornela", 68 | "Paula", 69 | "Paulina", 70 | "Pâmela", 71 | "Rafaela", 72 | "Rebeca", 73 | "Regina", 74 | "Renata", 75 | "Sabrina", 76 | "Salomé", 77 | "Samanta", 78 | "Sara", 79 | "Silvana", 80 | "Sofia", 81 | "Sophie", 82 | "Suzana", 83 | "Taís", 84 | "Tábata", 85 | "Valentina", 86 | "Valéria", 87 | "Violeta", 88 | "Vitória", 89 | "Abgail", 90 | "Constância", 91 | "Hortência", 92 | "Tessália", 93 | "Thalissa", 94 | ]; 95 | -------------------------------------------------------------------------------- /lib/locales/pt-BR/names/firstNameMale.js: -------------------------------------------------------------------------------- 1 | module.exports = [ 2 | "Aaron", 3 | "Adriano", 4 | "Alan", 5 | "Alexandre", 6 | "Alonso", 7 | "Anderson", 8 | "Andres", 9 | "Antônio", 10 | "Benjamin", 11 | "Bruno", 12 | "Camilo", 13 | "Carlos", 14 | "Christian", 15 | "Christopher", 16 | "Cristóvão", 17 | "Daniel", 18 | "Dante", 19 | "David", 20 | "Diego", 21 | "Eduardo", 22 | "Elias", 23 | "Emanuel", 24 | "Emiliano", 25 | "Emílio", 26 | "Estêvão", 27 | "Evandro", 28 | "Everton", 29 | "Felipe", 30 | "Fernando", 31 | "Francisco", 32 | "Franco", 33 | "Fábio", 34 | "Gabriel", 35 | "Gian", 36 | "Guilherme", 37 | "Gustavo", 38 | "Henrique", 39 | "Hernani", 40 | "Horácio", 41 | "Hugo", 42 | "Ian", 43 | "Inácio", 44 | "Isaac", 45 | "Ivan", 46 | "Jerônimo", 47 | "Joaquin", 48 | "Jorge", 49 | "Josué", 50 | "José", 51 | "João", 52 | "Kevin", 53 | "Leandro", 54 | "Leonardo", 55 | "Lucas", 56 | "Luciano", 57 | "Luis", 58 | "Manuel", 59 | "Mateus", 60 | "Matias", 61 | "Miguel", 62 | "Mário", 63 | "Máximo", 64 | "Noel", 65 | "Pablo", 66 | "Paulo", 67 | "Pedro", 68 | "Rafael", 69 | "Ricardo", 70 | "Rodrigo", 71 | "Samuel", 72 | "Santiago", 73 | "Simon", 74 | "Sérgio", 75 | "Thales", 76 | "Thiago", 77 | "Tomás", 78 | "Valentin", 79 | "Vicente", 80 | "Agostinho", 81 | "Demian", 82 | "Giovane", 83 | "Jácomo", 84 | "Martinho", 85 | "Maximiano", 86 | "Natal", 87 | "Sebastião", 88 | "Simão", 89 | "Teobaldo", 90 | "Ziraldo", 91 | ]; 92 | -------------------------------------------------------------------------------- /lib/locales/pt-BR/names/index.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | firstNameM: require("./firstNameMale"), 3 | firstNameF: require("./firstNameFemale"), 4 | lastNameM: require("./lastName"), 5 | lastNameF: require("./lastName"), 6 | 7 | prefix: [], 8 | suffix: [], 9 | 10 | nameM: [ 11 | "#{names.firstNameM} #{names.lastName}", 12 | "#{names.firstNameM} #{names.lastName}", 13 | "#{names.firstNameM} #{names.lastName} #{names.firstNameM}", 14 | ], 15 | 16 | nameF: [ 17 | "#{names.firstNameF} #{names.lastName}", 18 | "#{names.firstNameF} #{names.lastName}", 19 | "#{names.firstNameF} #{names.lastName} #{names.firstNameF}", 20 | ] 21 | }; 22 | -------------------------------------------------------------------------------- /lib/locales/pt-BR/names/lastName.js: -------------------------------------------------------------------------------- 1 | module.exports = [ 2 | "Abreu", 3 | "Azevedo", 4 | "Aguiar", 5 | "Aragão", 6 | "Assunção", 7 | "Aranda", 8 | "Ávila", 9 | "Balestero", 10 | "Barreto", 11 | "Barros", 12 | "Batista", 13 | "Bezerra", 14 | "Beltrão", 15 | "Benites", 16 | "Bittencourt", 17 | "Branco", 18 | "Bonilha", 19 | "Brito", 20 | "Burgos", 21 | "Caldeira", 22 | "Camacho", 23 | "Campos", 24 | "Carmona", 25 | "Carrara", 26 | "Casanova", 27 | "Chaves", 28 | "Cervantes", 29 | "Colaço", 30 | "Cordeiro", 31 | "Corona", 32 | "Correia", 33 | "Cortês", 34 | "Cruz", 35 | "D\"ávila", 36 | "Delatorre", 37 | "Delgado", 38 | "Delvalle", 39 | "Dias", 40 | "Domingues", 41 | "Dominato", 42 | "Duarte", 43 | "Escobar", 44 | "Espinoza", 45 | "Esteves", 46 | "Estrada", 47 | "Faria", 48 | "Faro", 49 | "Feliciano", 50 | "Ferminiano", 51 | "Fernandes", 52 | "Ferraz", 53 | "Ferreira", 54 | "Fidalgo", 55 | "Furtado", 56 | "Ferreira", 57 | "Flores", 58 | "Fonseca", 59 | "Franco", 60 | "Fontes", 61 | "Galindo", 62 | "Galhardo", 63 | "Galvão", 64 | "Garcia", 65 | "Gil", 66 | "Godói", 67 | "Gomes", 68 | "Gonçalves", 69 | "Grego", 70 | "Guerra", 71 | "Gusmão", 72 | "Jimenes", 73 | "Leal", 74 | "Leon", 75 | "Lira", 76 | "Lovato", 77 | "Lozano", 78 | "Lutero", 79 | "Madeira", 80 | "Maldonado", 81 | "Marés", 82 | "Marin", 83 | "Marinho", 84 | "Marques", 85 | "Martines", 86 | "Mascarenhas", 87 | "Matias", 88 | "Matos", 89 | "Maia", 90 | "Medina", 91 | "Meireles", 92 | "Mendes", 93 | "Mendonça", 94 | "Molina", 95 | "Montenegro", 96 | "Neves", 97 | "Oliveira", 98 | "Ortega", 99 | "Ortiz", 100 | "Quintana", 101 | "Queirós", 102 | "Pacheco", 103 | "Padilha", 104 | "Padrão", 105 | "Paes", 106 | "Paz", 107 | "Pedrosa", 108 | "Pena", 109 | "Pereira", 110 | "Perez", 111 | "Prado", 112 | "Pontes", 113 | "Quintana", 114 | "Queirós", 115 | "Ramires", 116 | "Ramos", 117 | "Rangel", 118 | "Rezende", 119 | "Reis", 120 | "Rico", 121 | "Rios", 122 | "Rivera", 123 | "Rocha", 124 | "Rodrigues", 125 | "Romero", 126 | "Roque", 127 | "Rosa", 128 | "Salas", 129 | "Salazar", 130 | "Sales", 131 | "Salgado", 132 | "Sanches", 133 | "Sandoval", 134 | "Santacruz", 135 | "Santana", 136 | "Santiago", 137 | "Saraiva", 138 | "Sepúlveda", 139 | "Serna", 140 | "Serra", 141 | "Serrano", 142 | "Soares", 143 | "Solano", 144 | "Soto", 145 | "Tamoio", 146 | "Teles", 147 | "Toledo", 148 | "Torres", 149 | "Uchoa", 150 | "Urias", 151 | "Valdez", 152 | "Valência", 153 | "Valentin", 154 | "Vale", 155 | "Vasques", 156 | "Vega", 157 | "Velasques", 158 | "Verdugo", 159 | "Verdara", 160 | "Vieira", 161 | "Vila", 162 | "Zamana", 163 | "Zambrano", 164 | "Zaragoça", 165 | "da Cruz", 166 | "da Rosa", 167 | "da Silva", 168 | "das Dores", 169 | "das Neves", 170 | "de Aguiar", 171 | "de Oliveira", 172 | "de Souza", 173 | "dos Santos", 174 | ]; 175 | -------------------------------------------------------------------------------- /lib/locales/pt-BR/phone/index.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | number: [ 3 | "+55 ## 2#######", 4 | "+55 ## 3#######", 5 | "+55 ## 4#######", 6 | "+55 ## 9########", 7 | 8 | "(##) 2### ####", 9 | "(##) 2###-####", 10 | "(##) 3### ####", 11 | "(##) 3###-####", 12 | "(##) 4### ####", 13 | "(##) 4###-####", 14 | 15 | "(##) 9#### ####", 16 | "(##) 9####-####", 17 | ] 18 | }; 19 | -------------------------------------------------------------------------------- /lib/locales/ru-RU/address/index.js: -------------------------------------------------------------------------------- 1 | import countries from "./countryWithCodes"; 2 | 3 | module.exports = { 4 | countryAndCode() { 5 | let country = this.random.objectElement(countries); 6 | return { 7 | code: Object.keys(country)[0], 8 | name: country[Object.keys(country)[0]] 9 | }; 10 | }, 11 | 12 | state: require("./state"), 13 | stateAbbr: [], 14 | 15 | city: [ 16 | "Москва", 17 | "Владимир", 18 | "Санкт-Петербург", 19 | "Новосибирск", 20 | "Екатеринбург", 21 | "Нижний Новгород", 22 | "Самара", 23 | "Казань", 24 | "Омск", 25 | "Челябинск", 26 | "Ростов-на-Дону", 27 | "Уфа", 28 | "Волгоград", 29 | "Пермь", 30 | "Красноярск", 31 | "Воронеж", 32 | "Саратов", 33 | "Краснодар", 34 | "Тольятти", 35 | "Ижевск", 36 | "Барнаул", 37 | "Ульяновск", 38 | "Тюмень", 39 | "Иркутск", 40 | "Владивосток", 41 | "Ярославль", 42 | "Хабаровск", 43 | "Махачкала", 44 | "Оренбург", 45 | "Новокузнецк", 46 | "Томск", 47 | "Кемерово", 48 | "Рязань", 49 | "Астрахань", 50 | "Пенза", 51 | "Липецк", 52 | "Тула", 53 | "Киров", 54 | "Чебоксары", 55 | "Курск", 56 | "Брянск", 57 | "Магнитогорск", 58 | "Иваново", 59 | "Тверь", 60 | "Ставрополь", 61 | "Белгород", 62 | "Сочи", 63 | "Якутск" 64 | ], 65 | 66 | street: [ 67 | "#{address.streetName}, #{address.buildingNumber}" 68 | ], 69 | 70 | streetName: [ 71 | "#{address.streetSuffix} #{address.streetTitle}", 72 | "#{address.streetTitle} #{address.streetSuffix}" 73 | ], 74 | 75 | streetTitle: require("./streetTitle"), 76 | 77 | streetSuffix: [ 78 | "ул.", 79 | "улица", 80 | "проспект", 81 | "пр.", 82 | "площадь", 83 | "пл." 84 | ], 85 | 86 | buildingNumber: [ 87 | "###" 88 | ], 89 | 90 | postCode: [ 91 | "######" 92 | ] 93 | 94 | }; -------------------------------------------------------------------------------- /lib/locales/ru-RU/address/state.js: -------------------------------------------------------------------------------- 1 | module.exports = [ 2 | "Республика Адыгея", 3 | "Республика Башкортостан", 4 | "Республика Бурятия", 5 | "Республика Алтай Республика Дагестан", 6 | "Республика Ингушетия", 7 | "Кабардино-Балкарская Республика", 8 | "Республика Калмыкия", 9 | "Республика Карачаево-Черкессия", 10 | "Республика Карелия", 11 | "Республика Коми", 12 | "Республика Марий Эл", 13 | "Республика Мордовия", 14 | "Республика Саха (Якутия)", 15 | "Республика Северная Осетия-Алания", 16 | "Республика Татарстан", 17 | "Республика Тыва", 18 | "Удмуртская Республика", 19 | "Республика Хакасия", 20 | "Чувашская Республика", 21 | "Алтайский край", 22 | "Краснодарский край", 23 | "Красноярский край", 24 | "Приморский край", 25 | "Ставропольский край", 26 | "Хабаровский край", 27 | "Амурская область", 28 | "Архангельская область", 29 | "Астраханская область", 30 | "Белгородская область", 31 | "Брянская область", 32 | "Владимирская область", 33 | "Волгоградская область", 34 | "Вологодская область", 35 | "Воронежская область", 36 | "Ивановская область", 37 | "Иркутская область", 38 | "Калиниградская область", 39 | "Калужская область", 40 | "Камчатская область", 41 | "Кемеровская область", 42 | "Кировская область", 43 | "Костромская область", 44 | "Курганская область", 45 | "Курская область", 46 | "Ленинградская область", 47 | "Липецкая область", 48 | "Магаданская область", 49 | "Московская область", 50 | "Мурманская область", 51 | "Нижегородская область", 52 | "Новгородская область", 53 | "Новосибирская область", 54 | "Омская область", 55 | "Оренбургская область", 56 | "Орловская область", 57 | "Пензенская область", 58 | "Пермская область", 59 | "Псковская область", 60 | "Ростовская область", 61 | "Рязанская область", 62 | "Самарская область", 63 | "Саратовская область", 64 | "Сахалинская область", 65 | "Свердловская область", 66 | "Смоленская область", 67 | "Тамбовская область", 68 | "Тверская область", 69 | "Томская область", 70 | "Тульская область", 71 | "Тюменская область", 72 | "Ульяновская область", 73 | "Челябинская область", 74 | "Читинская область", 75 | "Ярославская область", 76 | "Еврейская автономная область", 77 | "Агинский Бурятский автономный округ", 78 | "Коми-Пермяцкий автономный округ", 79 | "Корякский автономный округ", 80 | "Ненецкий автономный округ", 81 | "Таймырский (Долгано-Ненецкий) автономный округ", 82 | "Усть-Ордынский Бурятский автономный округ", 83 | "Ханты-Мансийский автономный округ", 84 | "Чукотский автономный округ", 85 | "Эвенкийский автономный округ", 86 | "Ямало-Ненецкий автономный округ", 87 | "Чеченская Республика" 88 | ]; -------------------------------------------------------------------------------- /lib/locales/ru-RU/address/streetTitle.js: -------------------------------------------------------------------------------- 1 | module.exports = [ 2 | "Советская", 3 | "Молодежная", 4 | "Центральная", 5 | "Школьная", 6 | "Новая", 7 | "Садовая", 8 | "Лесная", 9 | "Набережная", 10 | "Ленина", 11 | "Мира", 12 | "Октябрьская", 13 | "Зеленая", 14 | "Комсомольская", 15 | "Заречная", 16 | "Первомайская", 17 | "Гагарина", 18 | "Полевая", 19 | "Луговая", 20 | "Пионерская", 21 | "Кирова", 22 | "Юбилейная", 23 | "Северная", 24 | "Пролетарская", 25 | "Степная", 26 | "Пушкина", 27 | "Калинина", 28 | "Южная", 29 | "Колхозная", 30 | "Рабочая", 31 | "Солнечная", 32 | "Железнодорожная", 33 | "Восточная", 34 | "Заводская", 35 | "Чапаева", 36 | "Нагорная", 37 | "Строителей", 38 | "Береговая", 39 | "Победы", 40 | "Горького", 41 | "Кооперативная", 42 | "Красноармейская", 43 | "Совхозная", 44 | "Речная", 45 | "Школьный", 46 | "Спортивная", 47 | "Озерная", 48 | "Строительная", 49 | "Парковая", 50 | "Чкалова", 51 | "Мичурина", 52 | "речень улиц", 53 | "Подгорная", 54 | "Дружбы", 55 | "Почтовая", 56 | "Партизанская", 57 | "Вокзальная", 58 | "Лермонтова", 59 | "Свободы", 60 | "Дорожная", 61 | "Дачная", 62 | "Маяковского", 63 | "Западная", 64 | "Фрунзе", 65 | "Дзержинского", 66 | "Московская", 67 | "Свердлова", 68 | "Некрасова", 69 | "Гоголя", 70 | "Красная", 71 | "Трудовая", 72 | "Шоссейная", 73 | "Чехова", 74 | "Коммунистическая", 75 | "Труда", 76 | "Комарова", 77 | "Матросова", 78 | "Островского", 79 | "Сосновая", 80 | "Клубная", 81 | "Куйбышева", 82 | "Крупской", 83 | "Березовая", 84 | "Карла Маркса", 85 | "8 Марта", 86 | "Больничная", 87 | "Садовый", 88 | "Интернациональная", 89 | "Суворова", 90 | "Цветочная", 91 | "Трактовая", 92 | "Ломоносова", 93 | "Горная", 94 | "Космонавтов", 95 | "Энергетиков", 96 | "Шевченко", 97 | "Весенняя", 98 | "Механизаторов", 99 | "Коммунальная", 100 | "Лесной", 101 | "40 лет Победы", 102 | "Майская" 103 | ]; 104 | -------------------------------------------------------------------------------- /lib/locales/ru-RU/build.js: -------------------------------------------------------------------------------- 1 | import isNil from "lodash/isNil"; 2 | import isArray from "lodash/isArray"; 3 | import isFunction from "lodash/isFunction"; 4 | import isObject from "lodash/isObject"; 5 | import mergeWith from "lodash/mergeWith"; 6 | 7 | import Fakerator from "lib/fakerator"; 8 | 9 | module.exports = function() { 10 | let locale = require("lib/locales/ru-RU"); 11 | let fbLocale = require("lib/locales/default"); 12 | 13 | // Merge locale and fallback 14 | locale = mergeWith(locale, fbLocale, (objValue) => { 15 | // DON'T MERGE ARRAYS 16 | if (isArray(objValue) || isFunction(objValue)) 17 | return objValue; 18 | 19 | if (!isNil(objValue) && !isObject(objValue)) 20 | return objValue; 21 | }); 22 | 23 | return new Fakerator(locale); 24 | }; -------------------------------------------------------------------------------- /lib/locales/ru-RU/company/index.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | name: [ 3 | "#{company.prefix} #{names.firstNameF}", 4 | "#{company.prefix} #{names.firstNameM}", 5 | "#{company.prefix} #{names.lastNameM}", 6 | "#{company.prefix} #{company.suffix}#{company.suffix}", 7 | "#{company.prefix} #{company.suffix}#{company.suffix}#{company.suffix}", 8 | "#{company.prefix} #{address.city}#{company.suffix}", 9 | "#{company.prefix} #{address.city}#{company.suffix}#{company.suffix}", 10 | "#{company.prefix} #{address.city}#{company.suffix}#{company.suffix}#{company.suffix}" 11 | ], 12 | 13 | prefix: [ 14 | "ИП", 15 | "ООО", 16 | "ЗАО", 17 | "ОАО", 18 | "НКО", 19 | "ТСЖ", 20 | "ОП" 21 | ], 22 | 23 | suffix: [ 24 | "Снаб", 25 | "Торг", 26 | "Пром", 27 | "Трейд", 28 | "Сбыт" 29 | ] 30 | }; -------------------------------------------------------------------------------- /lib/locales/ru-RU/index.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | _meta: { 3 | id: "ru-RU", 4 | fallback: null, 5 | language: "Russian", 6 | country: "Russia", 7 | countryCode: "RU" 8 | }, 9 | 10 | names: require("./names"), 11 | phone: require("./phone"), 12 | address: require("./address"), 13 | company: require("./company"), 14 | internet: require("./internet") 15 | }; -------------------------------------------------------------------------------- /lib/locales/ru-RU/internet/index.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | tld: [ 3 | "com", 4 | "ru", 5 | "info", 6 | "рф", 7 | "net", 8 | "org", 9 | "ру" 10 | ], 11 | 12 | emailDomain: [ 13 | "yandex.ru", 14 | "ya.ru", 15 | "mail.ru", 16 | "gmail.com", 17 | "yahoo.com", 18 | "hotmail.com" 19 | ] 20 | }; -------------------------------------------------------------------------------- /lib/locales/ru-RU/names/firstNameFemale.js: -------------------------------------------------------------------------------- 1 | module.exports = [ 2 | "Анна", 3 | "Алёна", 4 | "Алевтина", 5 | "Александра", 6 | "Алина", 7 | "Алла", 8 | "Анастасия", 9 | "Ангелина", 10 | "Анжела", 11 | "Анжелика", 12 | "Антонида", 13 | "Антонина", 14 | "Анфиса", 15 | "Арина", 16 | "Валентина", 17 | "Валерия", 18 | "Варвара", 19 | "Василиса", 20 | "Вера", 21 | "Вероника", 22 | "Виктория", 23 | "Галина", 24 | "Дарья", 25 | "Евгения", 26 | "Екатерина", 27 | "Елена", 28 | "Елизавета", 29 | "Жанна", 30 | "Зинаида", 31 | "Зоя", 32 | "Ирина", 33 | "Кира", 34 | "Клавдия", 35 | "Ксения", 36 | "Лариса", 37 | "Лидия", 38 | "Любовь", 39 | "Людмила", 40 | "Маргарита", 41 | "Марина", 42 | "Мария", 43 | "Надежда", 44 | "Наталья", 45 | "Нина", 46 | "Оксана", 47 | "Ольга", 48 | "Раиса", 49 | "Регина", 50 | "Римма", 51 | "Светлана", 52 | "София", 53 | "Таисия", 54 | "Тамара", 55 | "Татьяна", 56 | "Ульяна", 57 | "Юлия" 58 | ]; 59 | -------------------------------------------------------------------------------- /lib/locales/ru-RU/names/firstNameMale.js: -------------------------------------------------------------------------------- 1 | module.exports = [ 2 | "Александр", 3 | "Алексей", 4 | "Альберт", 5 | "Анатолий", 6 | "Андрей", 7 | "Антон", 8 | "Аркадий", 9 | "Арсений", 10 | "Артём", 11 | "Борис", 12 | "Вадим", 13 | "Валентин", 14 | "Валерий", 15 | "Василий", 16 | "Виктор", 17 | "Виталий", 18 | "Владимир", 19 | "Владислав", 20 | "Вячеслав", 21 | "Геннадий", 22 | "Георгий", 23 | "Герман", 24 | "Григорий", 25 | "Даниил", 26 | "Денис", 27 | "Дмитрий", 28 | "Евгений", 29 | "Егор", 30 | "Иван", 31 | "Игнатий", 32 | "Игорь", 33 | "Илья", 34 | "Константин", 35 | "Лаврентий", 36 | "Леонид", 37 | "Лука", 38 | "Макар", 39 | "Максим", 40 | "Матвей", 41 | "Михаил", 42 | "Никита", 43 | "Николай", 44 | "Олег", 45 | "Роман", 46 | "Семён", 47 | "Сергей", 48 | "Станислав", 49 | "Степан", 50 | "Фёдор", 51 | "Эдуард", 52 | "Юрий", 53 | "Ярослав" 54 | ]; 55 | -------------------------------------------------------------------------------- /lib/locales/ru-RU/names/index.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | // Male first name 3 | firstNameM: require("./firstNameMale"), 4 | 5 | // Femail first name 6 | firstNameF: require("./firstNameFemale"), 7 | 8 | // Male middle name 9 | middleNameM: require("./middleNameMale"), 10 | 11 | // Femail middle name 12 | middleNameF: require("./middleNameFemale"), 13 | 14 | // Male last name 15 | lastNameM: require("./lastNameMale"), 16 | 17 | // Female last name 18 | lastNameF: require("./lastNameFemale"), 19 | 20 | prefix: [], 21 | 22 | suffix: [], 23 | 24 | nameM: [ 25 | "#{names.firstNameM} #{names.lastNameM}", 26 | "#{names.lastNameM} #{names.firstNameM}", 27 | "#{names.firstNameM} #{names.middleNameM} #{names.lastNameM}", 28 | "#{names.lastNameM} #{names.firstNameM} #{names.middleNameM}" 29 | 30 | ], 31 | 32 | nameF: [ 33 | "#{names.firstNameM} #{names.lastNameF}", 34 | "#{names.lastNameF} #{names.firstNameM}", 35 | "#{names.firstNameM} #{names.middleNameF} #{names.lastNameF}", 36 | "#{names.lastNameF} #{names.firstNameM} #{names.middleNameF}" 37 | ] 38 | 39 | }; -------------------------------------------------------------------------------- /lib/locales/ru-RU/names/middleNameFemale.js: -------------------------------------------------------------------------------- 1 | module.exports = [ 2 | "Александровна", 3 | "Алексеевна", 4 | "Альбертовна", 5 | "Анатольевна", 6 | "Андреевна", 7 | "Антоновна", 8 | "Аркадьевна", 9 | "Арсеньевна", 10 | "Артёмовна", 11 | "Борисовна", 12 | "Вадимовна", 13 | "Валентиновна", 14 | "Валерьевна", 15 | "Васильевна", 16 | "Викторовна", 17 | "Витальевна", 18 | "Владимировна", 19 | "Владиславовна", 20 | "Вячеславовна", 21 | "Геннадьевна", 22 | "Георгиевна", 23 | "Германовна", 24 | "Григорьевна", 25 | "Данииловна", 26 | "Денисовна", 27 | "Дмитриевна", 28 | "Евгеньевна", 29 | "Егоровна", 30 | "Ивановна", 31 | "Игнатьевна", 32 | "Игоревна", 33 | "Ильинична", 34 | "Константиновна", 35 | "Лаврентьевна", 36 | "Леонидовна", 37 | "Макаровна", 38 | "Максимовна", 39 | "Матвеевна", 40 | "Михайловна", 41 | "Никитична", 42 | "Николаевна", 43 | "Олеговна", 44 | "Романовна", 45 | "Семёновна", 46 | "Сергеевна", 47 | "Станиславовна", 48 | "Степановна", 49 | "Фёдоровна", 50 | "Эдуардовна", 51 | "Юрьевна", 52 | "Ярославовна" 53 | ]; 54 | -------------------------------------------------------------------------------- /lib/locales/ru-RU/names/middleNameMale.js: -------------------------------------------------------------------------------- 1 | module.exports = [ 2 | "Александрович", 3 | "Алексеевич", 4 | "Альбертович", 5 | "Анатольевич", 6 | "Андреевич", 7 | "Антонович", 8 | "Аркадьевич", 9 | "Арсеньевич", 10 | "Артёмович", 11 | "Борисович", 12 | "Вадимович", 13 | "Валентинович", 14 | "Валерьевич", 15 | "Васильевич", 16 | "Викторович", 17 | "Витальевич", 18 | "Владимирович", 19 | "Владиславович", 20 | "Вячеславович", 21 | "Геннадьевич", 22 | "Георгиевич", 23 | "Германович", 24 | "Григорьевич", 25 | "Даниилович", 26 | "Денисович", 27 | "Дмитриевич", 28 | "Евгеньевич", 29 | "Егорович", 30 | "Иванович", 31 | "Игнатьевич", 32 | "Игоревич", 33 | "Ильич", 34 | "Константинович", 35 | "Лаврентьевич", 36 | "Леонидович", 37 | "Лукич", 38 | "Макарович", 39 | "Максимович", 40 | "Матвеевич", 41 | "Михайлович", 42 | "Никитич", 43 | "Николаевич", 44 | "Олегович", 45 | "Романович", 46 | "Семёнович", 47 | "Сергеевич", 48 | "Станиславович", 49 | "Степанович", 50 | "Фёдорович", 51 | "Эдуардович", 52 | "Юрьевич", 53 | "Ярославович" 54 | ]; 55 | -------------------------------------------------------------------------------- /lib/locales/ru-RU/phone/index.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | number: [ 3 | "(9##)###-##-##" 4 | ] 5 | }; -------------------------------------------------------------------------------- /lib/locales/sk-SK/address/city.js: -------------------------------------------------------------------------------- 1 | module.exports = [ 2 | "Bánovce nad Bebravou", 3 | "Banská Bystrica", 4 | "Banská Štiavnica", 5 | "Bardejov", 6 | "Bratislava I", 7 | "Bratislava II", 8 | "Bratislava III", 9 | "Bratislava IV", 10 | "Bratislava V", 11 | "Brezno", 12 | "Bytča", 13 | "Čadca", 14 | "Detva", 15 | "Dolný Kubín", 16 | "Dunajská Streda", 17 | "Galanta", 18 | "Gelnica", 19 | "Hlohovec", 20 | "Humenné", 21 | "Ilava", 22 | "Kežmarok", 23 | "Komárno", 24 | "Košice I", 25 | "Košice II", 26 | "Košice III", 27 | "Košice IV", 28 | "Košice-okolie", 29 | "Krupina", 30 | "Kysucké Nové Mesto", 31 | "Levice", 32 | "Levoča", 33 | "Liptovský Mikuláš", 34 | "Lučenec", 35 | "Malacky", 36 | "Martin", 37 | "Medzilaborce", 38 | "Michalovce", 39 | "Myjava", 40 | "Námestovo", 41 | "Nitra", 42 | "Nové Mesto n.Váhom", 43 | "Nové Zámky", 44 | "Partizánske", 45 | "Pezinok", 46 | "Piešťany", 47 | "Poltár", 48 | "Poprad", 49 | "Považská Bystrica", 50 | "Prešov", 51 | "Prievidza", 52 | "Púchov", 53 | "Revúca", 54 | "Rimavská Sobota", 55 | "Rožňava", 56 | "Ružomberok", 57 | "Sabinov", 58 | "Šaľa", 59 | "Senec", 60 | "Senica", 61 | "Skalica", 62 | "Snina", 63 | "Sobrance", 64 | "Spišská Nová Ves", 65 | "Stará Ľubovňa", 66 | "Stropkov", 67 | "Svidník", 68 | "Topoľčany", 69 | "Trebišov", 70 | "Trenčín", 71 | "Trnava", 72 | "Turčianske Teplice", 73 | "Tvrdošín", 74 | "Veľký Krtíš", 75 | "Vranov nad Topľou", 76 | "Žarnovica", 77 | "Žiar nad Hronom", 78 | "Žilina", 79 | "Zlaté Moravce", 80 | "Zvolen" 81 | ]; 82 | -------------------------------------------------------------------------------- /lib/locales/sk-SK/address/index.js: -------------------------------------------------------------------------------- 1 | import countries from "./countryWithCodes"; 2 | 3 | module.exports = { 4 | countryAndCode() { 5 | let country = this.random.objectElement(countries); 6 | return { 7 | code: Object.keys(country)[0], 8 | name: country[Object.keys(country)[0]] 9 | }; 10 | }, 11 | 12 | state: [ 13 | ], 14 | 15 | stateAbbr: [ 16 | ], 17 | 18 | city: require("./city"), 19 | 20 | street: [ 21 | "#{address.streetName} #{address.buildingNumber}" 22 | ], 23 | 24 | streetName: require("./streetName"), 25 | 26 | streetSuffix: [], 27 | 28 | buildingNumber: [ 29 | "#", 30 | "##", 31 | "###" 32 | ], 33 | 34 | postCode: [ 35 | "#####", 36 | "### ##", 37 | "## ###" 38 | ] 39 | 40 | }; -------------------------------------------------------------------------------- /lib/locales/sk-SK/build.js: -------------------------------------------------------------------------------- 1 | import isNil from "lodash/isNil"; 2 | import isArray from "lodash/isArray"; 3 | import isFunction from "lodash/isFunction"; 4 | import isObject from "lodash/isObject"; 5 | import mergeWith from "lodash/mergeWith"; 6 | 7 | import Fakerator from "lib/fakerator"; 8 | 9 | module.exports = function() { 10 | let locale = require("lib/locales/sk-SK"); 11 | let fbLocale = require("lib/locales/default"); 12 | 13 | // Merge locale and fallback 14 | locale = mergeWith(locale, fbLocale, (objValue) => { 15 | // DON'T MERGE ARRAYS 16 | if (isArray(objValue) || isFunction(objValue)) 17 | return objValue; 18 | 19 | if (!isNil(objValue) && !isObject(objValue)) 20 | return objValue; 21 | }); 22 | 23 | return new Fakerator(locale); 24 | }; -------------------------------------------------------------------------------- /lib/locales/sk-SK/company/index.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | name: [ 3 | "#{names.lastName} #{company.suffix}", 4 | "#{names.lastName} #{company.suffix}", 5 | "#{names.lastName} a #{names.lastName} #{names.lastName}" 6 | ], 7 | 8 | suffix: [ 9 | "s.r.o.", 10 | "a.s.", 11 | "v.o.s." 12 | ] 13 | }; -------------------------------------------------------------------------------- /lib/locales/sk-SK/index.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | _meta: { 3 | id: "sk-SK", 4 | fallback: null, 5 | language: "Slovakian", 6 | country: "Slovakia", 7 | countryCode: "SK" 8 | }, 9 | 10 | names: require("./names"), 11 | phone: require("./phone"), 12 | address: require("./address"), 13 | company: require("./company"), 14 | internet: require("./internet") 15 | }; -------------------------------------------------------------------------------- /lib/locales/sk-SK/internet/index.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | tld: [ 3 | "sk", 4 | "com", 5 | "net", 6 | "eu", 7 | "org" 8 | ], 9 | 10 | emailDomain: [ 11 | "gmail.com", 12 | "zoznam.sk", 13 | "azet.sk" 14 | ] 15 | 16 | }; -------------------------------------------------------------------------------- /lib/locales/sk-SK/names/firstNameF.js: -------------------------------------------------------------------------------- 1 | module.exports = [ 2 | "Alexandra", 3 | "Karina", 4 | "Daniela", 5 | "Andrea", 6 | "Antónia", 7 | "Bohuslava", 8 | "Dáša", 9 | "Malvína", 10 | "Kristína", 11 | "Nataša", 12 | "Bohdana", 13 | "Drahomíra", 14 | "Sára", 15 | "Zora", 16 | "Tamara", 17 | "Ema", 18 | "Tatiana", 19 | "Erika", 20 | "Veronika", 21 | "Agáta", 22 | "Dorota", 23 | "Vanda", 24 | "Zoja", 25 | "Gabriela", 26 | "Perla", 27 | "Ida", 28 | "Liana", 29 | "Miloslava", 30 | "Vlasta", 31 | "Lívia", 32 | "Eleonóra", 33 | "Etela", 34 | "Romana", 35 | "Zlatica", 36 | "Anežka", 37 | "Bohumila", 38 | "Františka", 39 | "Angela", 40 | "Matilda", 41 | "Svetlana", 42 | "Ľubica", 43 | "Alena", 44 | "Soňa", 45 | "Vieroslava", 46 | "Zita", 47 | "Miroslava", 48 | "Irena", 49 | "Milena", 50 | "Estera", 51 | "Justína", 52 | "Dana", 53 | "Danica", 54 | "Jela", 55 | "Jaroslava", 56 | "Jarmila", 57 | "Lea", 58 | "Anastázia", 59 | "Galina", 60 | "Lesana", 61 | "Hermína", 62 | "Monika", 63 | "Ingrida", 64 | "Viktória", 65 | "Blažena", 66 | "Žofia", 67 | "Sofia", 68 | "Gizela", 69 | "Viola", 70 | "Gertrúda", 71 | "Zina", 72 | "Júlia", 73 | "Juliana", 74 | "Želmíra", 75 | "Ela", 76 | "Vanesa", 77 | "Iveta", 78 | "Vilma", 79 | "Petronela", 80 | "Žaneta", 81 | "Xénia", 82 | "Karolína", 83 | "Lenka", 84 | "Laura", 85 | "Stanislava", 86 | "Margaréta", 87 | "Dobroslava", 88 | "Blanka", 89 | "Valéria", 90 | "Paulína", 91 | "Sidónia", 92 | "Adriána", 93 | "Beáta", 94 | "Petra", 95 | "Melánia", 96 | "Diana", 97 | "Berta", 98 | "Patrícia", 99 | "Lujza", 100 | "Amália", 101 | "Milota", 102 | "Nina", 103 | "Margita", 104 | "Kamila", 105 | "Dušana", 106 | "Magdaléna", 107 | "Oľga", 108 | "Anna", 109 | "Hana", 110 | "Božena", 111 | "Marta", 112 | "Libuša", 113 | "Božidara", 114 | "Dominika", 115 | "Hortenzia", 116 | "Jozefína", 117 | "Štefánia", 118 | "Ľubomíra", 119 | "Zuzana", 120 | "Darina", 121 | "Marcela", 122 | "Milica", 123 | "Elena", 124 | "Helena", 125 | "Lýdia", 126 | "Anabela", 127 | "Jana", 128 | "Silvia", 129 | "Nikola", 130 | "Ružena", 131 | "Nora", 132 | "Drahoslava", 133 | "Linda", 134 | "Melinda", 135 | "Rebeka", 136 | "Rozália", 137 | "Regína", 138 | "Alica", 139 | "Marianna", 140 | "Miriama", 141 | "Martina", 142 | "Mária", 143 | "Jolana", 144 | "Ľudomila", 145 | "Ľudmila", 146 | "Olympia", 147 | "Eugénia", 148 | "Ľuboslava", 149 | "Zdenka", 150 | "Edita", 151 | "Michaela", 152 | "Stela", 153 | "Viera", 154 | "Natália", 155 | "Eliška", 156 | "Brigita", 157 | "Valentína", 158 | "Terézia", 159 | "Vladimíra", 160 | "Hedviga", 161 | "Uršuľa", 162 | "Alojza", 163 | "Kvetoslava", 164 | "Sabína", 165 | "Dobromila", 166 | "Klára", 167 | "Simona", 168 | "Aurélia", 169 | "Denisa", 170 | "Renáta", 171 | "Irma", 172 | "Agnesa", 173 | "Klaudia", 174 | "Alžbeta", 175 | "Elvíra", 176 | "Cecília", 177 | "Emília", 178 | "Katarína", 179 | "Henrieta", 180 | "Bibiána", 181 | "Barbora", 182 | "Marína", 183 | "Izabela", 184 | "Hilda", 185 | "Otília", 186 | "Lucia", 187 | "Branislava", 188 | "Bronislava", 189 | "Ivica", 190 | "Albína", 191 | "Kornélia", 192 | "Sláva", 193 | "Slávka", 194 | "Judita", 195 | "Dagmara", 196 | "Adela", 197 | "Nadežda", 198 | "Eva", 199 | "Filoména", 200 | "Ivana", 201 | "Milada" 202 | ]; 203 | -------------------------------------------------------------------------------- /lib/locales/sk-SK/names/firstNameM.js: -------------------------------------------------------------------------------- 1 | module.exports = [ 2 | "Drahoslav", 3 | "Severín", 4 | "Alexej", 5 | "Ernest", 6 | "Rastislav", 7 | "Radovan", 8 | "Dobroslav", 9 | "Dalibor", 10 | "Vincent", 11 | "Miloš", 12 | "Timotej", 13 | "Gejza", 14 | "Bohuš", 15 | "Alfonz", 16 | "Gašpar", 17 | "Emil", 18 | "Erik", 19 | "Blažej", 20 | "Zdenko", 21 | "Dezider", 22 | "Arpád", 23 | "Valentín", 24 | "Pravoslav", 25 | "Jaromír", 26 | "Roman", 27 | "Matej", 28 | "Frederik", 29 | "Viktor", 30 | "Alexander", 31 | "Radomír", 32 | "Albín", 33 | "Bohumil", 34 | "Kazimír", 35 | "Fridrich", 36 | "Radoslav", 37 | "Tomáš", 38 | "Alan", 39 | "Branislav", 40 | "Bruno", 41 | "Gregor", 42 | "Vlastimil", 43 | "Boleslav", 44 | "Eduard", 45 | "Jozef", 46 | "Víťazoslav", 47 | "Blahoslav", 48 | "Beňadik", 49 | "Adrián", 50 | "Gabriel", 51 | "Marián", 52 | "Emanuel", 53 | "Miroslav", 54 | "Benjamín", 55 | "Hugo", 56 | "Richard", 57 | "Izidor", 58 | "Zoltán", 59 | "Albert", 60 | "Igor", 61 | "Július", 62 | "Aleš", 63 | "Fedor", 64 | "Rudolf", 65 | "Valér", 66 | "Marcel", 67 | "Ervín", 68 | "Slavomír", 69 | "Vojtech", 70 | "Juraj", 71 | "Marek", 72 | "Jaroslav", 73 | "Žigmund", 74 | "Florián", 75 | "Roland", 76 | "Pankrác", 77 | "Servác", 78 | "Bonifác", 79 | "Svetozár", 80 | "Bernard", 81 | "Júlia", 82 | "Urban", 83 | "Dušan", 84 | "Viliam", 85 | "Ferdinand", 86 | "Norbert", 87 | "Róbert", 88 | "Medard", 89 | "Zlatko", 90 | "Anton", 91 | "Vasil", 92 | "Vít", 93 | "Adolf", 94 | "Vratislav", 95 | "Alfréd", 96 | "Alojz", 97 | "Ján", 98 | "Tadeáš", 99 | "Ladislav", 100 | "Peter", 101 | "Pavol", 102 | "Miloslav", 103 | "Prokop", 104 | "Cyril", 105 | "Metod", 106 | "Patrik", 107 | "Oliver", 108 | "Ivan", 109 | "Kamil", 110 | "Henrich", 111 | "Drahomír", 112 | "Bohuslav", 113 | "Iľja", 114 | "Daniel", 115 | "Vladimír", 116 | "Jakub", 117 | "Krištof", 118 | "Ignác", 119 | "Gustáv", 120 | "Jerguš", 121 | "Dominik", 122 | "Oskar", 123 | "Vavrinec", 124 | "Ľubomír", 125 | "Mojmír", 126 | "Leonard", 127 | "Tichomír", 128 | "Filip", 129 | "Bartolomej", 130 | "Ľudovít", 131 | "Samuel", 132 | "Augustín", 133 | "Belo", 134 | "Oleg", 135 | "Bystrík", 136 | "Ctibor", 137 | "Ľudomil", 138 | "Konštantín", 139 | "Ľuboslav", 140 | "Matúš", 141 | "Móric", 142 | "Ľuboš", 143 | "Ľubor", 144 | "Vladislav", 145 | "Cyprián", 146 | "Václav", 147 | "Michal", 148 | "Jarolím", 149 | "Arnold", 150 | "Levoslav", 151 | "František", 152 | "Dionýz", 153 | "Maximilián", 154 | "Koloman", 155 | "Boris", 156 | "Lukáš", 157 | "Kristián", 158 | "Vendelín", 159 | "Sergej", 160 | "Aurel", 161 | "Demeter", 162 | "Denis", 163 | "Hubert", 164 | "Karol", 165 | "Imrich", 166 | "René", 167 | "Bohumír", 168 | "Teodor", 169 | "Tibor", 170 | "Maroš", 171 | "Martin", 172 | "Svätopluk", 173 | "Stanislav", 174 | "Leopold", 175 | "Eugen", 176 | "Félix", 177 | "Klement", 178 | "Kornel", 179 | "Milan", 180 | "Vratko", 181 | "Ondrej", 182 | "Andrej", 183 | "Edmund", 184 | "Oldrich", 185 | "Oto", 186 | "Mikuláš", 187 | "Ambróz", 188 | "Radúz", 189 | "Bohdan", 190 | "Adam", 191 | "Štefan", 192 | "Dávid", 193 | "Silvester" 194 | ]; 195 | -------------------------------------------------------------------------------- /lib/locales/sk-SK/names/index.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | // Male first name 3 | firstNameM: require("./firstNameM"), 4 | 5 | // Femail first name 6 | firstNameF: require("./firstNameF"), 7 | 8 | // Male last name 9 | lastNameM: require("./lastNameM"), 10 | 11 | // Female last name 12 | lastNameF: require("./lastNameF"), 13 | 14 | prefix: [ 15 | "Ing.", 16 | "Mgr.", 17 | "JUDr.", 18 | "MUDr." 19 | ], 20 | 21 | suffix: [], 22 | 23 | nameM: [ 24 | "#{names.prefix} #{names.firstNameM} #{names.lastNameM}", 25 | "#{names.firstNameM} #{names.lastNameM}", 26 | "#{names.firstNameM} #{names.lastNameM}", 27 | "#{names.firstNameM} #{names.lastNameM}", 28 | "#{names.firstNameM} #{names.lastNameM}" 29 | ], 30 | 31 | nameF: [ 32 | "#{names.prefix} #{names.firstNameF} #{names.lastNameF}", 33 | "#{names.firstNameF} #{names.lastNameF}", 34 | "#{names.firstNameF} #{names.lastNameF}", 35 | "#{names.firstNameF} #{names.lastNameF}", 36 | "#{names.firstNameF} #{names.lastNameF}" 37 | ] 38 | 39 | }; -------------------------------------------------------------------------------- /lib/locales/sk-SK/phone/index.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | number: [ 3 | "09## ### ###", 4 | "0## #### ####", 5 | "0# #### ####", 6 | "+421 ### ### ###" 7 | ] 8 | }; -------------------------------------------------------------------------------- /lib/locales/sv-SE/address/index.js: -------------------------------------------------------------------------------- 1 | import countries from "./countryWithCodes"; 2 | 3 | module.exports = { 4 | countryAndCode() { 5 | let country = this.random.objectElement(countries); 6 | return { 7 | code: Object.keys(country)[0], 8 | name: country[Object.keys(country)[0]] 9 | }; 10 | }, 11 | 12 | state: [ 13 | "Blekinge", 14 | "Dalarna", 15 | "Gotland", 16 | "Gävleborg", 17 | "Göteborg", 18 | "Halland", 19 | "Jämtland", 20 | "Jönköping", 21 | "Kalmar", 22 | "Kronoberg", 23 | "Norrbotten", 24 | "Skaraborg", 25 | "Skåne", 26 | "Stockholm", 27 | "Södermanland", 28 | "Uppsala", 29 | "Värmland", 30 | "Västerbotten", 31 | "Västernorrland", 32 | "Västmanland", 33 | "Älvsborg", 34 | "Örebro", 35 | "Östergötland" 36 | ], 37 | 38 | stateAbbr: [ 39 | ], 40 | 41 | city: [ 42 | "#{address.cityPrefix}#{address.citySuffix}" 43 | ], 44 | 45 | cityPrefix: [ 46 | "Söder", 47 | "Norr", 48 | "Väst", 49 | "Öster", 50 | "Aling", 51 | "Ar", 52 | "Av", 53 | "Bo", 54 | "Br", 55 | "Bå", 56 | "Ek", 57 | "En", 58 | "Esk", 59 | "Fal", 60 | "Gäv", 61 | "Göte", 62 | "Ha", 63 | "Helsing", 64 | "Karl", 65 | "Krist", 66 | "Kram", 67 | "Kung", 68 | "Kö", 69 | "Lyck", 70 | "Ny" 71 | ], 72 | 73 | citySuffix: [ 74 | "stad", 75 | "land", 76 | "sås", 77 | "ås", 78 | "holm", 79 | "tuna", 80 | "sta", 81 | "berg", 82 | "löv", 83 | "borg", 84 | "mora", 85 | "hamn", 86 | "fors", 87 | "köping", 88 | "by", 89 | "hult", 90 | "torp", 91 | "fred", 92 | "vik" 93 | ], 94 | 95 | street: [ 96 | "#{address.streetName} #{address.buildingNumber}" 97 | ], 98 | 99 | streetName: [ 100 | "#{address.streetRoot}#{address.streetSuffix}", 101 | "#{address.streetNames.prefix} #{address.streetRoot}#{address.streetSuffix}", 102 | "#{names.firstName}#{address.commonStreetSuffix}", 103 | "#{names.lastName}#{address.commonStreetSuffix}" 104 | ], 105 | 106 | streetPrefix: [ 107 | "Västra", 108 | "Östra", 109 | "Norra", 110 | "Södra", 111 | "Övre", 112 | "Undre" 113 | ], 114 | 115 | streetRoot: [ 116 | "Björk", 117 | "Järnvägs", 118 | "Ring", 119 | "Skol", 120 | "Skogs", 121 | "Ny", 122 | "Gran", 123 | "Idrotts", 124 | "Stor", 125 | "Kyrk", 126 | "Industri", 127 | "Park", 128 | "Strand", 129 | "Skol", 130 | "Trädgård", 131 | "Ängs", 132 | "Kyrko", 133 | "Villa", 134 | "Ek", 135 | "Kvarn", 136 | "Stations", 137 | "Back", 138 | "Furu", 139 | "Gen", 140 | "Fabriks", 141 | "Åker", 142 | "Bäck", 143 | "Asp" 144 | ], 145 | 146 | streetSuffix: [ 147 | "vägen", 148 | "gatan", 149 | "gränden", 150 | "gärdet", 151 | "allén" 152 | ], 153 | 154 | commonStreetSuffix: [ 155 | "s Väg", 156 | "s Gata" 157 | ], 158 | 159 | buildingNumber: [ 160 | "###", 161 | "##", 162 | "#" 163 | ], 164 | 165 | postCode: [ 166 | "#####" 167 | ] 168 | 169 | }; -------------------------------------------------------------------------------- /lib/locales/sv-SE/build.js: -------------------------------------------------------------------------------- 1 | import isNil from "lodash/isNil"; 2 | import isArray from "lodash/isArray"; 3 | import isFunction from "lodash/isFunction"; 4 | import isObject from "lodash/isObject"; 5 | import mergeWith from "lodash/mergeWith"; 6 | 7 | import Fakerator from "lib/fakerator"; 8 | 9 | module.exports = function() { 10 | let locale = require("lib/locales/sv-SE"); 11 | let fbLocale = require("lib/locales/default"); 12 | 13 | // Merge locale and fallback 14 | locale = mergeWith(locale, fbLocale, (objValue) => { 15 | // DON'T MERGE ARRAYS 16 | if (isArray(objValue) || isFunction(objValue)) 17 | return objValue; 18 | 19 | if (!isNil(objValue) && !isObject(objValue)) 20 | return objValue; 21 | }); 22 | 23 | return new Fakerator(locale); 24 | }; -------------------------------------------------------------------------------- /lib/locales/sv-SE/company/index.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | name: [ 3 | "#{names.lastName} #{company.suffix}", 4 | "#{names.lastName}-#{company.suffix}", 5 | "#{names.lastName}, #{names.lastName} #{company.suffix}" 6 | ], 7 | 8 | suffix: [ 9 | "Gruppen", 10 | "AB", 11 | "HB", 12 | "Group", 13 | "Investment", 14 | "Kommanditbolag", 15 | "Aktiebolag" 16 | ] 17 | }; -------------------------------------------------------------------------------- /lib/locales/sv-SE/index.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | _meta: { 3 | id: "sv-SE", 4 | fallback: null, 5 | language: "Swedish", 6 | country: "Sweden", 7 | countryCode: "SE" 8 | }, 9 | 10 | names: require("./names"), 11 | phone: require("./phone"), 12 | address: require("./address"), 13 | company: require("./company"), 14 | internet: require("./internet") 15 | }; -------------------------------------------------------------------------------- /lib/locales/sv-SE/internet/index.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | tld: [ 3 | "se", 4 | "nu", 5 | "info", 6 | "com", 7 | "org" 8 | ] 9 | 10 | }; -------------------------------------------------------------------------------- /lib/locales/sv-SE/names/firstNameF.js: -------------------------------------------------------------------------------- 1 | module.exports = [ 2 | "Maria", 3 | "Anna", 4 | "Margareta", 5 | "Elisabeth", 6 | "Eva", 7 | "Birgitta", 8 | "Kristina", 9 | "Karin", 10 | "Elisabet", 11 | "Marie" 12 | ]; 13 | -------------------------------------------------------------------------------- /lib/locales/sv-SE/names/firstNameM.js: -------------------------------------------------------------------------------- 1 | module.exports = [ 2 | "Erik", 3 | "Lars", 4 | "Karl", 5 | "Anders", 6 | "Per", 7 | "Johan", 8 | "Nils", 9 | "Lennart", 10 | "Emil", 11 | "Hans" 12 | ]; 13 | -------------------------------------------------------------------------------- /lib/locales/sv-SE/names/index.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | // Male first name 3 | firstNameM: require("./firstNameM"), 4 | 5 | // Femail first name 6 | firstNameF: require("./firstNameF"), 7 | 8 | // Male last name 9 | lastNameM: require("./lastName"), 10 | 11 | // Female last name 12 | lastNameF: require("./lastName"), 13 | 14 | prefix: [ 15 | "Dr.", 16 | "Prof.", 17 | "PhD." 18 | ], 19 | 20 | suffix: [], 21 | 22 | nameM: [ 23 | "#{names.prefix} #{names.firstNameM} #{names.lastNameM}", 24 | "#{names.firstNameM} #{names.lastNameM}", 25 | "#{names.firstNameM} #{names.lastNameM}", 26 | "#{names.firstNameM} #{names.lastNameM}" 27 | ], 28 | 29 | nameF: [ 30 | "#{names.prefix} #{names.firstNameM} #{names.lastNameF}", 31 | "#{names.firstNameF} #{names.lastNameF}", 32 | "#{names.firstNameF} #{names.lastNameF}", 33 | "#{names.firstNameF} #{names.lastNameF}" 34 | ] 35 | 36 | }; -------------------------------------------------------------------------------- /lib/locales/sv-SE/names/lastName.js: -------------------------------------------------------------------------------- 1 | module.exports = [ 2 | "Johansson", 3 | "Andersson", 4 | "Karlsson", 5 | "Nilsson", 6 | "Eriksson", 7 | "Larsson", 8 | "Olsson", 9 | "Persson", 10 | "Svensson", 11 | "Gustafsson" 12 | ]; 13 | -------------------------------------------------------------------------------- /lib/locales/sv-SE/phone/index.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | number: [ 3 | "####-#####", 4 | "####-######" 5 | ] 6 | }; -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "fakerator", 3 | "version": "0.3.6", 4 | "description": "Random data generator with localization", 5 | "main": "dist/fakerator.js", 6 | "types": "dist/fakerator.d.ts", 7 | "directories": { 8 | "test": "test" 9 | }, 10 | "scripts": { 11 | "prebuild": "npm run test", 12 | "copytype": "copyfiles fakerator.d.ts dist", 13 | "build": "webpack --config config/webpack.build.config.js && npm run copytype", 14 | "lint": "eslint --ext=.js lib test/specs", 15 | "coverall": "cat ./test/coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js", 16 | "coverage": "npm run test && npm run coverall", 17 | "changelog": "conventional-changelog -i CHANGELOG.md -s", 18 | "pretest": "npm run lint", 19 | "test": "karma start test/karma.conf.js", 20 | "ci": "karma start test/karma.conf.js --auto-watch --no-single-run --reporters=dots", 21 | "release": "git push --follow-tags && npm publish" 22 | }, 23 | "repository": { 24 | "type": "git", 25 | "url": "git+https://github.com/icebob/fakerator.git" 26 | }, 27 | "files": [ 28 | "dist/fakerator.js", 29 | "dist/fakerator.min.js", 30 | "dist/fakerator.d.ts", 31 | "dist/locales", 32 | "src", 33 | "vendor" 34 | ], 35 | "keywords": [ 36 | "fake", 37 | "contextual", 38 | "casual", 39 | "random", 40 | "generator", 41 | "mocks", 42 | "test" 43 | ], 44 | "author": "Icebob", 45 | "license": "MIT", 46 | "bugs": { 47 | "url": "https://github.com/icebob/fakerator/issues" 48 | }, 49 | "homepage": "https://github.com/icebob/fakerator#readme", 50 | "devDependencies": { 51 | "babel-core": "^6.26.3", 52 | "babel-istanbul-loader": "0.1.0", 53 | "babel-loader": "6.2.9", 54 | "babel-plugin-transform-runtime": "^6.23.0", 55 | "babel-preset-es2015": "^6.24.1", 56 | "babel-preset-stage-0": "^6.24.1", 57 | "chai": "3.5.0", 58 | "conventional-changelog-cli": "1.2.0", 59 | "copyfiles": "^2.4.1", 60 | "coveralls": "2.11.15", 61 | "del": "2.2.2", 62 | "eslint": "3.13.0", 63 | "eslint-friendly-formatter": "2.0.7", 64 | "glob": "7.1.1", 65 | "inject-loader": "2.0.1", 66 | "karma": "1.3.0", 67 | "karma-chai": "0.1.0", 68 | "karma-chrome-launcher": "1.0.1", 69 | "karma-coverage": "1.1.1", 70 | "karma-coveralls": "1.1.2", 71 | "karma-mocha": "1.2.0", 72 | "karma-phantomjs-launcher": "^1.0.4", 73 | "karma-sinon-chai": "1.2.4", 74 | "karma-sourcemap-loader": "^0.3.8", 75 | "karma-spec-reporter": "0.0.34", 76 | "karma-webpack": "1.8.0", 77 | "lodash": "^4.17.21", 78 | "lolex": "1.5.2", 79 | "mocha": "2.5.3", 80 | "mocha-generators": "1.2.0", 81 | "mocha-loader": "1.1.0", 82 | "password-generator": "^2.3.2", 83 | "phantomjs-prebuilt": "^2.1.16", 84 | "sinon": "1.17.7", 85 | "sinon-chai": "2.8.0", 86 | "uuid": "3.0.1", 87 | "webpack": "1.14.0", 88 | "webpack-merge": "2.3.1" 89 | } 90 | } 91 | -------------------------------------------------------------------------------- /test/index.js: -------------------------------------------------------------------------------- 1 | // require all test files (files that ends with .spec.js) 2 | var testsContext = require.context('./specs', true, /\.spec$/); 3 | testsContext.keys().forEach(testsContext); 4 | 5 | require("lib"); 6 | -------------------------------------------------------------------------------- /test/karma.conf.js: -------------------------------------------------------------------------------- 1 | var wsConfig = require('../config/webpack.test.config'); 2 | 3 | module.exports = function(config) { 4 | var settings = { 5 | // base path that will be used to resolve all patterns (eg. files, exclude) 6 | basePath: '', 7 | 8 | browsers: ['PhantomJS'], 9 | 10 | reporters: ['spec', 'coverage'], 11 | 12 | frameworks: ['mocha', 'chai', 'sinon-chai'], 13 | 14 | files: ['./index.js'], 15 | 16 | exclude: [], 17 | 18 | preprocessors: { 19 | './index.js': ['webpack', 'sourcemap'] 20 | }, 21 | 22 | webpack: wsConfig, 23 | 24 | webpackMiddleware: { 25 | noInfo: true 26 | }, 27 | 28 | port: 9876, 29 | 30 | colors: true, 31 | 32 | logLevel: config.LOG_INFO, 33 | 34 | autoWatch: false, 35 | 36 | singleRun: true, 37 | 38 | coverageReporter: { 39 | dir: './coverage', 40 | reporters: [ 41 | { type: 'lcov', subdir: '.' }, 42 | { type: 'text-summary' } 43 | ] 44 | } 45 | } 46 | 47 | config.set(settings); 48 | } -------------------------------------------------------------------------------- /test/specs/index.spec.js: -------------------------------------------------------------------------------- 1 | import { expect } from "chai"; 2 | 3 | import Fakerator from "lib"; 4 | 5 | describe("Fakerator", () => { 6 | 7 | it("check class methods", () => { 8 | expect(Fakerator).to.be.exist; 9 | 10 | let fakerator = new Fakerator(); 11 | 12 | expect(fakerator).to.be.exist; 13 | 14 | expect(fakerator.locale).to.be.an("Object"); 15 | expect(fakerator.seed).to.be.an("Function"); 16 | expect(fakerator.random.number).to.be.an("Function"); 17 | expect(fakerator.random.boolean).to.be.an("Function"); 18 | expect(fakerator.random.digit).to.be.an("Function"); 19 | expect(fakerator.random.letter).to.be.an("Function"); 20 | expect(fakerator.random.arrayElement).to.be.an("Function"); 21 | expect(fakerator.random.objectElement).to.be.an("Function"); 22 | expect(fakerator.random.masked).to.be.an("Function"); 23 | expect(fakerator.slugify).to.be.an("Function"); 24 | expect(fakerator.replaceSymbols).to.be.an("Function"); 25 | expect(fakerator.shuffle).to.be.an("Function"); 26 | expect(fakerator.times).to.be.an("Function"); 27 | expect(fakerator.populate).to.be.an("Function"); 28 | }); 29 | 30 | it("check 'default' locale", () => { 31 | 32 | let fakerator = new Fakerator(); 33 | 34 | expect(fakerator).to.be.exist; 35 | expect(fakerator.locale).to.be.an("Object"); 36 | expect(fakerator.locale._meta.id).to.be.equal("default"); 37 | expect(fakerator.locale._meta.language).to.be.equal("English"); 38 | expect(fakerator.locale._meta.country).to.be.equal("United Kingdom"); 39 | 40 | }); 41 | 42 | it("check loading locale", () => { 43 | 44 | let fakerator = new Fakerator("hu-HU"); 45 | 46 | expect(fakerator).to.be.exist; 47 | expect(fakerator.locale).to.be.an("Object"); 48 | expect(fakerator.locale._meta.id).to.be.equal("hu-HU"); 49 | expect(fakerator.locale._meta.fallback).to.be.null; 50 | expect(fakerator.locale._meta.language).to.be.equal("Hungarian"); 51 | expect(fakerator.locale._meta.country).to.be.equal("Hungary"); 52 | expect(fakerator.locale.names).to.be.an("Object"); 53 | expect(fakerator.locale.lorem).to.be.an("Object"); 54 | }); 55 | 56 | it("check fallback", () => { 57 | 58 | let fakerator = new Fakerator("xy"); 59 | 60 | expect(fakerator).to.be.exist; 61 | expect(fakerator.locale).to.be.an("Object"); 62 | expect(fakerator.locale._meta.id).to.be.equal("default"); 63 | expect(fakerator.locale.names).to.be.an("Object"); 64 | expect(fakerator.locale.lorem).to.be.an("Object"); 65 | }); 66 | 67 | }); -------------------------------------------------------------------------------- /test/specs/locales/cs-CZ/index.spec.js: -------------------------------------------------------------------------------- 1 | import { expect } from "chai"; 2 | 3 | import Fakerator from "lib"; 4 | 5 | describe("Locale cs-CZ", () => { 6 | 7 | let fakerator; 8 | 9 | beforeEach( () => { 10 | fakerator = new Fakerator("cs-CZ"); 11 | fakerator.seed(4646); 12 | }); 13 | 14 | it("check locale definitions", () => { 15 | expect(fakerator.locale.names).to.be.an("Object"); 16 | expect(fakerator.locale.names.firstNameM).to.be.length(796); 17 | 18 | expect(fakerator.locale.phone).to.be.an("Object"); 19 | expect(fakerator.locale.address).to.be.an("Object"); 20 | expect(fakerator.locale.company).to.be.an("Object"); 21 | expect(fakerator.locale.internet).to.be.an("Object"); 22 | }); 23 | 24 | it("check names definitions", () => { 25 | expect(fakerator.names.firstName()).to.be.equal("Valdemara"); 26 | expect(fakerator.names.lastName()).to.be.equal("Skalickýová"); 27 | expect(fakerator.names.name()).to.be.equal("Milivoj Mráček"); 28 | }); 29 | 30 | it("check company definitions", () => { 31 | expect(fakerator.company.name()).to.be.equal("Plšková v.o.s."); 32 | }); 33 | 34 | it("check phone definitions", () => { 35 | expect(fakerator.phone.number()).to.be.equal("867 075 553"); 36 | }); 37 | 38 | it("check address definitions", () => { 39 | expect(fakerator.address.city()).to.be.equal("Přeštice"); 40 | expect(fakerator.address.street()).to.be.equal("Přímské Náměstí 075"); 41 | expect(fakerator.address.buildingNumber()).to.be.equal("53"); 42 | expect(fakerator.address.postCode()).to.be.equal("502-34"); 43 | expect(fakerator.address.country()).to.be.equal("Francouzská jižní území"); 44 | }); 45 | 46 | it("check internet definitions", () => { 47 | expect(fakerator.internet.userName()).to.be.equal("valdemara.skalickov"); 48 | expect(fakerator.internet.domain()).to.be.equal("lujza-kohoutkov.co"); 49 | expect(fakerator.internet.emailDomain()).to.be.equal("centrum.cz"); 50 | expect(fakerator.internet.email()).to.be.equal("donald06@seznam.cz"); 51 | }); 52 | 53 | it("check entity.user", () => { 54 | let user = fakerator.entity.user(); 55 | expect(user).to.be.an("Object"); 56 | //console.log(user); 57 | 58 | expect(user).to.have.property("firstName").an("String"); 59 | expect(user).to.have.property("lastName").an("String"); 60 | expect(user).to.have.property("userName").an("String"); 61 | expect(user).to.have.property("password").an("String"); 62 | expect(user).to.have.property("email").an("String"); 63 | expect(user).to.have.property("phone").an("String"); 64 | expect(user).to.have.property("dob").an("Date"); 65 | expect(user).to.have.property("website").an("String"); 66 | expect(user).to.have.property("ip").an("String"); 67 | expect(user).to.have.property("avatar").an("String"); 68 | expect(user).to.have.property("gravatar").an("String"); 69 | expect(user).to.have.property("status").an("Boolean"); 70 | expect(user).to.have.property("address").an("Object"); 71 | 72 | expect(user.address).to.have.property("country").an("String"); 73 | expect(user.address).to.have.property("countryCode").an("String").length(2); 74 | expect(user.address).to.have.property("city").an("String"); 75 | expect(user.address).to.have.property("street").an("String"); 76 | expect(user.address).to.have.property("zip").an("String"); 77 | expect(user.address).to.have.property("geo").an("Object"); 78 | expect(user.address.geo).to.have.property("latitude").an("Number"); 79 | expect(user.address.geo).to.have.property("longitude").an("Number"); 80 | 81 | }); 82 | 83 | }); -------------------------------------------------------------------------------- /test/specs/locales/default/company.spec.js: -------------------------------------------------------------------------------- 1 | import { expect } from "chai"; 2 | 3 | import Fakerator from "lib"; 4 | 5 | describe("Default company", () => { 6 | 7 | let fakerator; 8 | 9 | beforeEach( () => { 10 | fakerator = new Fakerator(); 11 | fakerator.seed(8080); 12 | }); 13 | 14 | it("check company.name", () => { 15 | expect(fakerator.populate("#{company.name}")).to.be.equal("Weber, Gleichner and Kertzmann Inc."); 16 | expect(fakerator.company.name()).to.be.equal("Orn-Johnson Inc."); 17 | }); 18 | 19 | it("check company.suffix", () => { 20 | expect(fakerator.populate("#{company.suffix}")).to.be.equal("LLC"); 21 | expect(fakerator.company.suffix()).to.be.equal("Ltd."); 22 | }); 23 | 24 | }); -------------------------------------------------------------------------------- /test/specs/locales/default/date.spec.js: -------------------------------------------------------------------------------- 1 | import { expect } from "chai"; 2 | 3 | import Fakerator from "lib"; 4 | 5 | describe("Default date", () => { 6 | 7 | let fakerator; 8 | 9 | beforeEach( () => { 10 | fakerator = new Fakerator(); 11 | fakerator.seed(8080); 12 | }); 13 | 14 | it("check date.timezone", () => { 15 | expect(fakerator.populate("#{date.timezone}")).to.be.equal("Asia/Bangkok"); 16 | expect(fakerator.date.timezone()).to.be.equal("America/Lima"); 17 | }); 18 | 19 | it("check date.past", () => { 20 | //expect(fakerator.populate("#{date.past}")).to.be.an("Date"); 21 | expect(fakerator.date.past()).to.be.an("Date"); 22 | expect(fakerator.date.past(10)).to.be.an("Date"); 23 | }); 24 | 25 | it("check date.future", () => { 26 | //expect(fakerator.populate("#{date.future}")).to.be.an("Date"); 27 | expect(fakerator.date.future()).to.be.an("Date"); 28 | expect(fakerator.date.future(10)).to.be.an("Date"); 29 | }); 30 | 31 | it("check date.between", () => { 32 | //expect(fakerator.populate("#{date.between}")).to.be.an("Date"); 33 | expect(fakerator.date.between()).to.be.an("Date"); 34 | expect(fakerator.date.between(new Date(), new Date())).to.be.an("Date"); 35 | }); 36 | 37 | it("check date.recent", () => { 38 | //expect(fakerator.populate("#{date.recent}")).to.be.an("Date"); 39 | expect(fakerator.date.recent()).to.be.an("Date"); 40 | expect(fakerator.date.recent(10)).to.be.an("Date"); 41 | }); 42 | 43 | it("check date.age", () => { 44 | expect(fakerator.populate("#{date.age}")).to.be.equal("63"); 45 | expect(fakerator.date.age()).to.be.equal(26); 46 | expect(fakerator.date.age(6, 18)).to.be.equal(18); 47 | }); 48 | 49 | it("check date.month", () => { 50 | expect(fakerator.populate("#{date.month}")).to.be.equal("September"); 51 | expect(fakerator.date.month()).to.be.equal("February"); 52 | }); 53 | 54 | it("check date.weekday", () => { 55 | expect(fakerator.populate("#{date.weekday}")).to.be.equal("Friday"); 56 | expect(fakerator.date.weekday()).to.be.equal("Sunday"); 57 | }); 58 | 59 | it("check date.weekdayShort", () => { 60 | expect(fakerator.populate("#{date.weekdayShort}")).to.be.equal("Fri"); 61 | expect(fakerator.date.weekdayShort()).to.be.equal("Sun"); 62 | }); 63 | 64 | it("check date.weekdayMin", () => { 65 | expect(fakerator.populate("#{date.weekdayMin}")).to.be.equal("Fr"); 66 | expect(fakerator.date.weekdayMin()).to.be.equal("Su"); 67 | }); 68 | 69 | }); -------------------------------------------------------------------------------- /test/specs/locales/default/index.spec.js: -------------------------------------------------------------------------------- 1 | import { expect } from "chai"; 2 | 3 | import Fakerator from "lib"; 4 | 5 | describe("Locale default", () => { 6 | 7 | let fakerator; 8 | 9 | beforeEach( () => { 10 | fakerator = new Fakerator(); 11 | }); 12 | 13 | it("check locale definitions", () => { 14 | expect(fakerator.locale.names).to.be.an("Object"); 15 | expect(fakerator.locale.phone).to.be.an("Object"); 16 | expect(fakerator.locale.address).to.be.an("Object"); 17 | expect(fakerator.locale.company).to.be.an("Object"); 18 | expect(fakerator.locale.internet).to.be.an("Object"); 19 | expect(fakerator.locale.lorem).to.be.an("Object"); 20 | expect(fakerator.locale.date).to.be.an("Object"); 21 | }); 22 | 23 | }); -------------------------------------------------------------------------------- /test/specs/locales/default/lorem.spec.js: -------------------------------------------------------------------------------- 1 | import { expect } from "chai"; 2 | 3 | import Fakerator from "lib"; 4 | 5 | describe("Default lorem", () => { 6 | 7 | let fakerator; 8 | 9 | beforeEach( () => { 10 | fakerator = new Fakerator(); 11 | fakerator.seed(8080); 12 | }); 13 | 14 | it("check lorem.word", () => { 15 | expect(fakerator.populate("#{lorem.word}")).to.be.equal("est"); 16 | expect(fakerator.lorem.word()).to.be.equal("dolores"); 17 | }); 18 | 19 | it("check lorem.sentence", () => { 20 | expect(fakerator.populate("#{lorem.sentence}")).to.be.equal("Dolores recusandae laborum ut quia odio consequatur similique."); 21 | expect(fakerator.lorem.sentence()).to.be.equal("Libero similique quam voluptas soluta."); 22 | }); 23 | 24 | it("check lorem.paragraph", () => { 25 | expect(fakerator.populate("#{lorem.paragraph}")).to.be.an("String"); 26 | expect(fakerator.lorem.paragraph()).to.be.an("String"); 27 | }); 28 | 29 | }); -------------------------------------------------------------------------------- /test/specs/locales/default/misc.spec.js: -------------------------------------------------------------------------------- 1 | import { expect } from "chai"; 2 | 3 | import Fakerator from "lib"; 4 | 5 | describe("Default misc", () => { 6 | 7 | let fakerator; 8 | 9 | beforeEach( () => { 10 | fakerator = new Fakerator(); 11 | fakerator.seed(8080); 12 | }); 13 | 14 | it("check misc.uuid", () => { 15 | expect(fakerator.populate("#{misc.uuid}")).to.be 16 | .an("String") 17 | .length(36) 18 | .match(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/); 19 | 20 | expect(fakerator.misc.uuid()).to.be 21 | .an("String") 22 | .length(36) 23 | .match(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/); 24 | }); 25 | 26 | }); -------------------------------------------------------------------------------- /test/specs/locales/default/names.spec.js: -------------------------------------------------------------------------------- 1 | import { expect } from "chai"; 2 | 3 | import Fakerator from "lib"; 4 | 5 | describe("Default names", () => { 6 | 7 | let fakerator; 8 | 9 | beforeEach( () => { 10 | fakerator = new Fakerator(); 11 | fakerator.seed(8080); 12 | }); 13 | 14 | it("check names.name", () => { 15 | expect(fakerator.populate("#{names.name}")).to.be.equal("Dr. Sheryl Gleichner"); 16 | expect(fakerator.names.name()).to.be.equal("Vernon Mante"); 17 | }); 18 | 19 | it("check names.firstNameM", () => { 20 | expect(fakerator.populate("#{names.firstNameM}")).to.be.equal("Marco"); 21 | expect(fakerator.names.firstNameM()).to.be.equal("Bruce"); 22 | }); 23 | 24 | it("check names.firstNameF", () => { 25 | expect(fakerator.populate("#{names.firstNameF}")).to.be.equal("Juana"); 26 | expect(fakerator.names.firstNameF()).to.be.equal("Kelly"); 27 | }); 28 | 29 | it("check names.lastNameM", () => { 30 | expect(fakerator.populate("#{names.lastNameM}")).to.be.equal("Reilly"); 31 | expect(fakerator.names.lastNameM()).to.be.equal("Collier"); 32 | }); 33 | 34 | it("check names.lastNameF", () => { 35 | expect(fakerator.populate("#{names.lastNameF}")).to.be.equal("Reilly"); 36 | expect(fakerator.names.lastNameF()).to.be.equal("Collier"); 37 | }); 38 | 39 | it("check names.lastName", () => { 40 | expect(fakerator.populate("#{names.lastName}")).to.be.equal("Collier"); 41 | expect(fakerator.names.lastName()).to.be.equal("Moore"); 42 | }); 43 | 44 | it("check names.prefix", () => { 45 | expect(fakerator.populate("#{names.prefix}")).to.be.equal("Miss"); 46 | expect(fakerator.names.prefix()).to.be.equal("Mr."); 47 | }); 48 | 49 | it("check names.suffix", () => { 50 | expect(fakerator.populate("#{names.suffix}")).to.be.equal("MD"); 51 | expect(fakerator.names.suffix()).to.be.equal("Sr."); 52 | }); 53 | 54 | it("check names.nameM", () => { 55 | expect(fakerator.populate("#{names.nameM}")).to.be.equal("Bruce Weber"); 56 | expect(fakerator.names.nameM()).to.be.equal("Don Daniel"); 57 | }); 58 | 59 | it("check names.nameF", () => { 60 | expect(fakerator.populate("#{names.nameF}")).to.be.equal("Kelly Weber"); 61 | expect(fakerator.names.nameF()).to.be.equal("Juanita Daniel"); 62 | }); 63 | 64 | }); -------------------------------------------------------------------------------- /test/specs/locales/default/phone.spec.js: -------------------------------------------------------------------------------- 1 | import { expect } from "chai"; 2 | 3 | import Fakerator from "lib"; 4 | 5 | describe("Default phone", () => { 6 | 7 | let fakerator; 8 | 9 | beforeEach( () => { 10 | fakerator = new Fakerator(); 11 | fakerator.seed(8080); 12 | }); 13 | 14 | it("check phone.number", () => { 15 | expect(fakerator.populate("#{phone.number}")).to.be.equal("1-196-214-3536 x5436"); 16 | expect(fakerator.phone.number()).to.be.equal("(640) 552-0763"); 17 | }); 18 | 19 | }); -------------------------------------------------------------------------------- /test/specs/locales/en-AU/index.spec.js: -------------------------------------------------------------------------------- 1 | import { expect } from "chai"; 2 | 3 | import Fakerator from "lib"; 4 | 5 | describe("Locale en-AU", () => { 6 | 7 | let fakerator; 8 | 9 | beforeEach( () => { 10 | fakerator = new Fakerator("en-AU"); 11 | fakerator.seed(6161); 12 | }); 13 | 14 | it("check locale definitions", () => { 15 | expect(fakerator.locale.names).to.be.an("Object"); 16 | expect(fakerator.locale.names.firstNameM).to.be.length(200); 17 | 18 | expect(fakerator.locale.phone).to.be.an("Object"); 19 | expect(fakerator.locale.address).to.be.an("Object"); 20 | expect(fakerator.locale.company).to.be.an("Object"); 21 | expect(fakerator.locale.internet).to.be.an("Object"); 22 | }); 23 | 24 | it("check names definitions", () => { 25 | expect(fakerator.names.firstName()).to.be.equal("Hannah"); 26 | expect(fakerator.names.lastName()).to.be.equal("Heathcote"); 27 | expect(fakerator.names.name()).to.be.equal("Finn Collins"); 28 | }); 29 | 30 | it("check company definitions", () => { 31 | expect(fakerator.company.name()).to.be.equal("Mills Group"); 32 | }); 33 | 34 | it("check phone definitions", () => { 35 | expect(fakerator.phone.number()).to.be.equal("05 7545 3131"); 36 | }); 37 | 38 | it("check address definitions", () => { 39 | expect(fakerator.address.city()).to.be.equal("New Jessicabury"); 40 | expect(fakerator.address.street()).to.be.equal("131 Greenholt Inlet Apt. 884"); 41 | expect(fakerator.address.streetName()).to.be.equal("Borer Neck"); 42 | expect(fakerator.address.buildingNumber()).to.be.equal("96"); 43 | expect(fakerator.address.postCode()).to.be.equal("4143"); 44 | expect(fakerator.address.state()).to.be.equal("South Australia"); 45 | expect(fakerator.address.country()).to.be.equal("Zimbabwe"); 46 | }); 47 | 48 | it("check internet definitions", () => { 49 | expect(fakerator.internet.userName()).to.be.equal("hannah.heathcote5313"); 50 | expect(fakerator.internet.domain()).to.be.equal("hayley.biz"); 51 | expect(fakerator.internet.emailDomain()).to.be.equal("yahoo.com"); 52 | expect(fakerator.internet.email()).to.be.equal("heidi.hickle59@gmail.com"); 53 | }); 54 | 55 | it("check entity.user", () => { 56 | let user = fakerator.entity.user(); 57 | expect(user).to.be.an("Object"); 58 | //console.log(user); 59 | 60 | expect(user).to.have.property("firstName").an("String"); 61 | expect(user).to.have.property("lastName").an("String"); 62 | expect(user).to.have.property("userName").an("String"); 63 | expect(user).to.have.property("password").an("String"); 64 | expect(user).to.have.property("email").an("String"); 65 | expect(user).to.have.property("phone").an("String"); 66 | expect(user).to.have.property("dob").an("Date"); 67 | expect(user).to.have.property("website").an("String"); 68 | expect(user).to.have.property("ip").an("String"); 69 | expect(user).to.have.property("avatar").an("String"); 70 | expect(user).to.have.property("gravatar").an("String"); 71 | expect(user).to.have.property("status").an("Boolean"); 72 | expect(user).to.have.property("address").an("Object"); 73 | 74 | expect(user.address).to.have.property("country").an("String"); 75 | expect(user.address).to.have.property("countryCode").an("String").length(2); 76 | expect(user.address).to.have.property("state").an("String"); 77 | expect(user.address).to.have.property("city").an("String"); 78 | expect(user.address).to.have.property("street").an("String"); 79 | expect(user.address).to.have.property("zip").an("String"); 80 | expect(user.address).to.have.property("geo").an("Object"); 81 | expect(user.address.geo).to.have.property("latitude").an("Number"); 82 | expect(user.address.geo).to.have.property("longitude").an("Number"); 83 | 84 | }); 85 | 86 | }); -------------------------------------------------------------------------------- /test/specs/locales/en-CA/index.spec.js: -------------------------------------------------------------------------------- 1 | import { expect } from "chai"; 2 | 3 | import Fakerator from "lib"; 4 | 5 | describe("Locale en-CA", () => { 6 | 7 | let fakerator; 8 | 9 | beforeEach( () => { 10 | fakerator = new Fakerator("en-CA"); 11 | fakerator.seed(1111); 12 | }); 13 | 14 | it("check locale definitions", () => { 15 | expect(fakerator.locale.names).to.be.an("Object"); 16 | expect(fakerator.locale.phone).to.be.an("Object"); 17 | expect(fakerator.locale.address).to.be.an("Object"); 18 | expect(fakerator.locale.company).to.be.an("Object"); 19 | expect(fakerator.locale.internet).to.be.an("Object"); 20 | }); 21 | 22 | it("check address definitions", () => { 23 | expect(fakerator.address.postCode()).to.be.equal("i4g 9i2"); 24 | expect(fakerator.address.state()).to.be.equal("Prince Edward Island"); 25 | }); 26 | 27 | it("check internet definitions", () => { 28 | expect(fakerator.internet.domain()).to.be.equal("rolando.net"); 29 | }); 30 | 31 | }); -------------------------------------------------------------------------------- /test/specs/locales/es-ES/index.spec.js: -------------------------------------------------------------------------------- 1 | import { expect } from "chai"; 2 | 3 | import Fakerator from "lib"; 4 | 5 | describe("Locale es-ES", () => { 6 | 7 | let fakerator; 8 | 9 | beforeEach( () => { 10 | fakerator = new Fakerator("es-ES"); 11 | fakerator.seed(5050); 12 | }); 13 | 14 | it("check locale definitions", () => { 15 | expect(fakerator.locale.names).to.be.an("Object"); 16 | expect(fakerator.locale.names.firstNameM).to.be.length(212); 17 | 18 | expect(fakerator.locale.phone).to.be.an("Object"); 19 | expect(fakerator.locale.address).to.be.an("Object"); 20 | expect(fakerator.locale.company).to.be.an("Object"); 21 | expect(fakerator.locale.internet).to.be.an("Object"); 22 | }); 23 | 24 | it("check names definitions", () => { 25 | expect(fakerator.names.firstName()).to.be.equal("Elsa"); 26 | expect(fakerator.names.lastName()).to.be.equal("Paredes"); 27 | expect(fakerator.names.name()).to.be.equal("Teodoro Cornejo Segovia"); 28 | }); 29 | 30 | it("check company definitions", () => { 31 | expect(fakerator.company.name()).to.be.equal("Torres S.A."); 32 | }); 33 | 34 | it("check phone definitions", () => { 35 | expect(fakerator.phone.number()).to.be.equal("968-634-492"); 36 | }); 37 | 38 | it("check address definitions", () => { 39 | expect(fakerator.address.city()).to.be.equal("Parla"); 40 | expect(fakerator.address.street()).to.be.equal("Prolongación Roberto Valdivia, 6 Esc. 812"); 41 | expect(fakerator.address.streetName()).to.be.equal("Prolongación Adán"); 42 | expect(fakerator.address.buildingNumber()).to.be.equal(" 4"); 43 | expect(fakerator.address.postCode()).to.be.equal("69912"); 44 | expect(fakerator.address.state()).to.be.equal("Aragón"); 45 | expect(fakerator.address.country()).to.be.equal("Brasil"); 46 | }); 47 | 48 | it("check internet definitions", () => { 49 | expect(fakerator.internet.userName()).to.be.equal("elsa.paredes4492"); 50 | expect(fakerator.internet.domain()).to.be.equal("ernestocadena.info"); 51 | expect(fakerator.internet.emailDomain()).to.be.equal("hotmail.com"); 52 | expect(fakerator.internet.email()).to.be.equal("gloria91@yahoo.com"); 53 | }); 54 | 55 | it("check entity.user", () => { 56 | let user = fakerator.entity.user(); 57 | expect(user).to.be.an("Object"); 58 | //console.log(user); 59 | 60 | expect(user).to.have.property("firstName").an("String"); 61 | expect(user).to.have.property("lastName").an("String"); 62 | expect(user).to.have.property("userName").an("String"); 63 | expect(user).to.have.property("password").an("String"); 64 | expect(user).to.have.property("email").an("String"); 65 | expect(user).to.have.property("phone").an("String"); 66 | expect(user).to.have.property("dob").an("Date"); 67 | expect(user).to.have.property("website").an("String"); 68 | expect(user).to.have.property("ip").an("String"); 69 | expect(user).to.have.property("avatar").an("String"); 70 | expect(user).to.have.property("gravatar").an("String"); 71 | expect(user).to.have.property("status").an("Boolean"); 72 | expect(user).to.have.property("address").an("Object"); 73 | 74 | expect(user.address).to.have.property("country").an("String"); 75 | expect(user.address).to.have.property("countryCode").an("String").length(2); 76 | expect(user.address).to.have.property("state").an("String"); 77 | expect(user.address).to.have.property("city").an("String"); 78 | expect(user.address).to.have.property("street").an("String"); 79 | expect(user.address).to.have.property("zip").an("String"); 80 | expect(user.address).to.have.property("geo").an("Object"); 81 | expect(user.address.geo).to.have.property("latitude").an("Number"); 82 | expect(user.address.geo).to.have.property("longitude").an("Number"); 83 | 84 | }); 85 | 86 | }); -------------------------------------------------------------------------------- /test/specs/locales/nb-NO/index.spec.js: -------------------------------------------------------------------------------- 1 | import { expect } from "chai"; 2 | 3 | import Fakerator from "lib"; 4 | 5 | describe("Locale nb-NO", () => { 6 | 7 | let fakerator; 8 | 9 | beforeEach( () => { 10 | fakerator = new Fakerator("nb-NO"); 11 | fakerator.seed(4100); 12 | }); 13 | 14 | it("check locale definitions", () => { 15 | expect(fakerator.locale.names).to.be.an("Object"); 16 | expect(fakerator.locale.names.firstNameM).to.be.length(50); 17 | 18 | expect(fakerator.locale.phone).to.be.an("Object"); 19 | expect(fakerator.locale.address).to.be.an("Object"); 20 | expect(fakerator.locale.company).to.be.an("Object"); 21 | expect(fakerator.locale.internet).to.be.an("Object"); 22 | }); 23 | 24 | it("check names definitions", () => { 25 | expect(fakerator.names.firstNameM()).to.be.equal("Sebastian"); 26 | expect(fakerator.names.firstNameF()).to.be.equal("Sunniva"); 27 | expect(fakerator.names.lastName()).to.be.equal("Holm"); 28 | expect(fakerator.names.nameM()).to.be.equal("Markus Edvardsen"); 29 | expect(fakerator.names.nameF()).to.be.equal("Aurora Aasen"); 30 | }); 31 | 32 | it("check company definitions", () => { 33 | expect(fakerator.company.name()).to.be.equal("Fredriksen ASA"); 34 | }); 35 | 36 | it("check phone definitions", () => { 37 | expect(fakerator.phone.number()).to.be.equal("86 38 09 96"); 38 | }); 39 | 40 | it("check address definitions", () => { 41 | expect(fakerator.address.city()).to.be.equal("Utsjøen"); 42 | expect(fakerator.address.street()).to.be.equal("Vestre Eikeåsen"); 43 | expect(fakerator.address.streetName()).to.be.equal("Sjø"); 44 | expect(fakerator.address.buildingNumber()).to.be.equal("65"); 45 | expect(fakerator.address.postCode()).to.be.equal("4577"); 46 | 47 | expect(fakerator.address.country()).to.be.equal("Tyrkia"); 48 | 49 | expect(fakerator.address.state()).to.be.undefined; 50 | }); 51 | 52 | it("check internet definitions", () => { 53 | expect(fakerator.internet.userName()).to.be.equal("andersholm09"); 54 | expect(fakerator.internet.domain()).to.be.equal("elise-olsen.biz"); 55 | expect(fakerator.internet.email()).to.be.equal("maren.nygrd@gmail.com"); 56 | }); 57 | 58 | it("check entity.user", () => { 59 | let user = fakerator.entity.user(); 60 | expect(user).to.be.an("Object"); 61 | //console.log(user); 62 | 63 | expect(user).to.have.property("firstName").an("String"); 64 | expect(user).to.have.property("lastName").an("String"); 65 | expect(user).to.have.property("userName").an("String"); 66 | expect(user).to.have.property("password").an("String"); 67 | expect(user).to.have.property("email").an("String"); 68 | expect(user).to.have.property("phone").an("String"); 69 | expect(user).to.have.property("dob").an("Date"); 70 | expect(user).to.have.property("website").an("String"); 71 | expect(user).to.have.property("ip").an("String"); 72 | expect(user).to.have.property("avatar").an("String"); 73 | expect(user).to.have.property("gravatar").an("String"); 74 | expect(user).to.have.property("status").an("Boolean"); 75 | expect(user).to.have.property("address").an("Object"); 76 | 77 | expect(user.address).to.have.property("country").an("String"); 78 | expect(user.address).to.have.property("countryCode").an("String").length(2); 79 | expect(user.address.state).to.be.undefined; 80 | expect(user.address).to.have.property("city").an("String"); 81 | expect(user.address).to.have.property("street").an("String"); 82 | expect(user.address).to.have.property("zip").an("String"); 83 | expect(user.address).to.have.property("geo").an("Object"); 84 | expect(user.address.geo).to.have.property("latitude").an("Number"); 85 | expect(user.address.geo).to.have.property("longitude").an("Number"); 86 | 87 | }); 88 | 89 | }); -------------------------------------------------------------------------------- /test/specs/locales/pl-PL/index.spec.js: -------------------------------------------------------------------------------- 1 | import { expect } from "chai"; 2 | 3 | import Fakerator from "lib"; 4 | 5 | describe("Locale pl-PL", () => { 6 | 7 | let fakerator; 8 | 9 | beforeEach( () => { 10 | fakerator = new Fakerator("pl-PL"); 11 | fakerator.seed(5050); 12 | }); 13 | 14 | it("check locale definitions", () => { 15 | expect(fakerator.locale.names).to.be.an("Object"); 16 | expect(fakerator.locale.names.firstNameM).to.be.length(409); 17 | 18 | expect(fakerator.locale.phone).to.be.an("Object"); 19 | expect(fakerator.locale.address).to.be.an("Object"); 20 | expect(fakerator.locale.company).to.be.an("Object"); 21 | expect(fakerator.locale.internet).to.be.an("Object"); 22 | }); 23 | 24 | it("check names definitions", () => { 25 | expect(fakerator.names.firstName()).to.be.equal("Cecylia"); 26 | expect(fakerator.names.lastName()).to.be.equal("Popławski"); 27 | expect(fakerator.names.name()).to.be.equal("Randolf Głąb"); 28 | }); 29 | 30 | it("check company definitions", () => { 31 | expect(fakerator.company.name()).to.be.equal("Witczak LLC"); 32 | }); 33 | 34 | it("check phone definitions", () => { 35 | expect(fakerator.phone.number()).to.be.equal("968-634-492"); 36 | }); 37 | 38 | it("check address definitions", () => { 39 | expect(fakerator.address.city()).to.be.equal("Aleksandrów Łódzki"); 40 | expect(fakerator.address.street()).to.be.equal("al. Kozieł 9268"); 41 | expect(fakerator.address.streetName()).to.be.equal("ul. Porębski"); 42 | expect(fakerator.address.buildingNumber()).to.be.equal("064"); 43 | expect(fakerator.address.postCode()).to.be.equal("69-912"); 44 | expect(fakerator.address.state()).to.be.equal("Kujawsko-pomorskie"); 45 | expect(fakerator.address.country()).to.be.equal("Brazylia"); 46 | }); 47 | 48 | it("check internet definitions", () => { 49 | expect(fakerator.internet.userName()).to.be.equal("cecylia.popawski4492"); 50 | expect(fakerator.internet.domain()).to.be.equal("korneliuszdziuba.info"); 51 | expect(fakerator.internet.emailDomain()).to.be.equal("hotmail.com"); 52 | expect(fakerator.internet.email()).to.be.equal("emilia91@yahoo.com"); 53 | }); 54 | 55 | it("check entity.user", () => { 56 | let user = fakerator.entity.user(); 57 | expect(user).to.be.an("Object"); 58 | //console.log(user); 59 | 60 | expect(user).to.have.property("firstName").an("String"); 61 | expect(user).to.have.property("lastName").an("String"); 62 | expect(user).to.have.property("userName").an("String"); 63 | expect(user).to.have.property("password").an("String"); 64 | expect(user).to.have.property("email").an("String"); 65 | expect(user).to.have.property("phone").an("String"); 66 | expect(user).to.have.property("dob").an("Date"); 67 | expect(user).to.have.property("website").an("String"); 68 | expect(user).to.have.property("ip").an("String"); 69 | expect(user).to.have.property("avatar").an("String"); 70 | expect(user).to.have.property("gravatar").an("String"); 71 | expect(user).to.have.property("status").an("Boolean"); 72 | expect(user).to.have.property("address").an("Object"); 73 | 74 | expect(user.address).to.have.property("country").an("String"); 75 | expect(user.address).to.have.property("countryCode").an("String").length(2); 76 | expect(user.address).to.have.property("state").an("String"); 77 | expect(user.address).to.have.property("city").an("String"); 78 | expect(user.address).to.have.property("street").an("String"); 79 | expect(user.address).to.have.property("zip").an("String"); 80 | expect(user.address).to.have.property("geo").an("Object"); 81 | expect(user.address.geo).to.have.property("latitude").an("Number"); 82 | expect(user.address.geo).to.have.property("longitude").an("Number"); 83 | 84 | }); 85 | 86 | }); -------------------------------------------------------------------------------- /test/specs/locales/pt-BR/index.spec.js: -------------------------------------------------------------------------------- 1 | import { expect } from "chai"; 2 | 3 | import Fakerator from "lib"; 4 | 5 | describe("Locale pt-BR", () => { 6 | 7 | let fakerator; 8 | 9 | beforeEach( () => { 10 | fakerator = new Fakerator("pt-BR"); 11 | fakerator.seed(5511); 12 | }); 13 | 14 | it("check locale definitions", () => { 15 | expect(fakerator.locale.names).to.be.an("Object"); 16 | expect(fakerator.locale.names.firstNameM).to.be.length(89); 17 | 18 | expect(fakerator.locale.phone).to.be.an("Object"); 19 | expect(fakerator.locale.address).to.be.an("Object"); 20 | expect(fakerator.locale.company).to.be.an("Object"); 21 | expect(fakerator.locale.internet).to.be.an("Object"); 22 | }); 23 | 24 | it("check names definitions", () => { 25 | expect(fakerator.names.firstName()).to.be.equal("Manuel"); 26 | expect(fakerator.names.lastName()).to.be.equal("Toledo"); 27 | expect(fakerator.names.name()).to.be.equal("Carla Reis"); 28 | }); 29 | 30 | it("check company definitions", () => { 31 | expect(fakerator.company.name()).to.be.equal("Grupo Toledo"); 32 | }); 33 | 34 | it("check phone definitions", () => { 35 | expect(fakerator.phone.number()).to.be.equal("+55 64 38552065"); 36 | }); 37 | 38 | it("check address definitions", () => { 39 | expect(fakerator.address.city()).to.be.equal("New Tomásmouth"); 40 | expect(fakerator.address.street()).to.be.equal("Alameda Maitê 1696 Apto 440"); 41 | expect(fakerator.address.streetName()).to.be.equal("Alameda Laura"); 42 | expect(fakerator.address.buildingNumber()).to.be.equal("026"); 43 | expect(fakerator.address.postCode()).to.be.equal("72001-317"); 44 | expect(fakerator.address.state()).to.be.equal("Piauí"); 45 | expect(fakerator.address.country()).to.be.equal("Armênia"); 46 | }); 47 | 48 | it("check internet definitions", () => { 49 | expect(fakerator.internet.userName()).to.be.equal("manuel_toledo"); 50 | expect(fakerator.internet.domain()).to.be.equal("adrianomolina.info"); 51 | expect(fakerator.internet.emailDomain()).to.be.equal("gmail.com"); 52 | expect(fakerator.internet.email()).to.be.equal("abgail.marin@yahoo.com"); 53 | }); 54 | 55 | it("check entity.user", () => { 56 | let user = fakerator.entity.user(); 57 | expect(user).to.be.an("Object"); 58 | 59 | expect(user).to.have.property("firstName").an("String"); 60 | expect(user).to.have.property("lastName").an("String"); 61 | expect(user).to.have.property("userName").an("String"); 62 | expect(user).to.have.property("password").an("String"); 63 | expect(user).to.have.property("email").an("String"); 64 | expect(user).to.have.property("phone").an("String"); 65 | expect(user).to.have.property("dob").an("Date"); 66 | expect(user).to.have.property("website").an("String"); 67 | expect(user).to.have.property("ip").an("String"); 68 | expect(user).to.have.property("avatar").an("String"); 69 | expect(user).to.have.property("gravatar").an("String"); 70 | expect(user).to.have.property("status").an("Boolean"); 71 | expect(user).to.have.property("address").an("Object"); 72 | 73 | expect(user.address).to.have.property("country").an("String"); 74 | expect(user.address).to.have.property("countryCode").an("String").length(2); 75 | expect(user.address).to.have.property("state").an("String"); 76 | expect(user.address).to.have.property("city").an("String"); 77 | expect(user.address).to.have.property("street").an("String"); 78 | expect(user.address).to.have.property("zip").an("String"); 79 | expect(user.address).to.have.property("geo").an("Object"); 80 | expect(user.address.geo).to.have.property("latitude").an("Number"); 81 | expect(user.address.geo).to.have.property("longitude").an("Number"); 82 | 83 | }); 84 | 85 | }); -------------------------------------------------------------------------------- /test/specs/locales/sv-SE/index.spec.js: -------------------------------------------------------------------------------- 1 | import { expect } from "chai"; 2 | 3 | import Fakerator from "lib"; 4 | 5 | describe("Locale sv-SE", () => { 6 | 7 | let fakerator; 8 | 9 | beforeEach( () => { 10 | fakerator = new Fakerator("sv-SE"); 11 | fakerator.seed(4100); 12 | }); 13 | 14 | it("check locale definitions", () => { 15 | expect(fakerator.locale.names).to.be.an("Object"); 16 | expect(fakerator.locale.names.firstNameM).to.be.length(10); 17 | 18 | expect(fakerator.locale.phone).to.be.an("Object"); 19 | expect(fakerator.locale.address).to.be.an("Object"); 20 | expect(fakerator.locale.company).to.be.an("Object"); 21 | expect(fakerator.locale.internet).to.be.an("Object"); 22 | }); 23 | 24 | it("check names definitions", () => { 25 | expect(fakerator.names.firstNameM()).to.be.equal("Anders"); 26 | expect(fakerator.names.firstNameF()).to.be.equal("Elisabet"); 27 | expect(fakerator.names.lastName()).to.be.equal("Nilsson"); 28 | expect(fakerator.names.nameM()).to.be.equal("Erik Gustafsson"); 29 | expect(fakerator.names.nameF()).to.be.equal("Kristina Olsson"); 30 | }); 31 | 32 | it("check company definitions", () => { 33 | expect(fakerator.company.name()).to.be.equal("Olsson HB"); 34 | }); 35 | 36 | it("check phone definitions", () => { 37 | expect(fakerator.phone.number()).to.be.equal("8638-09966"); 38 | }); 39 | 40 | it("check address definitions", () => { 41 | expect(fakerator.address.city()).to.be.equal("Köfors"); 42 | expect(fakerator.address.street()).to.be.equal("Gustafssons Gata 6"); 43 | expect(fakerator.address.streetName()).to.be.equal("Pers Gata"); 44 | expect(fakerator.address.buildingNumber()).to.be.equal("7"); 45 | expect(fakerator.address.postCode()).to.be.equal("20229"); 46 | 47 | expect(fakerator.address.country()).to.be.equal("Argentina"); 48 | 49 | expect(fakerator.address.state()).to.be.equal("Jämtland"); 50 | }); 51 | 52 | it("check internet definitions", () => { 53 | expect(fakerator.internet.userName()).to.be.equal("emilnilsson09"); 54 | expect(fakerator.internet.domain()).to.be.equal("kristina-johansson.biz"); 55 | expect(fakerator.internet.email()).to.be.equal("karin.gustafsson@gmail.com"); 56 | }); 57 | 58 | it("check entity.user", () => { 59 | let user = fakerator.entity.user(); 60 | expect(user).to.be.an("Object"); 61 | //console.log(user); 62 | 63 | expect(user).to.have.property("firstName").an("String"); 64 | expect(user).to.have.property("lastName").an("String"); 65 | expect(user).to.have.property("userName").an("String"); 66 | expect(user).to.have.property("password").an("String"); 67 | expect(user).to.have.property("email").an("String"); 68 | expect(user).to.have.property("phone").an("String"); 69 | expect(user).to.have.property("dob").an("Date"); 70 | expect(user).to.have.property("website").an("String"); 71 | expect(user).to.have.property("ip").an("String"); 72 | expect(user).to.have.property("avatar").an("String"); 73 | expect(user).to.have.property("gravatar").an("String"); 74 | expect(user).to.have.property("status").an("Boolean"); 75 | expect(user).to.have.property("address").an("Object"); 76 | 77 | expect(user.address).to.have.property("country").an("String"); 78 | expect(user.address).to.have.property("countryCode").an("String").length(2); 79 | expect(user.address).to.have.property("state").an("String"); 80 | expect(user.address).to.have.property("city").an("String"); 81 | expect(user.address).to.have.property("street").an("String"); 82 | expect(user.address).to.have.property("zip").an("String"); 83 | expect(user.address).to.have.property("geo").an("Object"); 84 | expect(user.address.geo).to.have.property("latitude").an("Number"); 85 | expect(user.address.geo).to.have.property("longitude").an("Number"); 86 | 87 | }); 88 | 89 | }); -------------------------------------------------------------------------------- /test/specs/others.spec.js: -------------------------------------------------------------------------------- 1 | import { expect } from "chai"; 2 | 3 | import Fakerator from "lib"; 4 | 5 | describe("Fakerator utils", () => { 6 | 7 | let fakerator; 8 | 9 | beforeEach( () => { 10 | fakerator = new Fakerator(); 11 | fakerator.seed(4278); 12 | }); 13 | 14 | it("check slugify function", () => { 15 | expect(fakerator.slugify(" This is a * very_complex-text!with Extra character(s). ")) 16 | .to.be.equal("This-is-a--very_complex-textwith---Extra-characters."); 17 | }); 18 | 19 | it("check replaceSymbols function", () => { 20 | expect(fakerator.replaceSymbols("ABC-###-XYZ")) 21 | .to.be.equal("ABC-445-XYZ"); 22 | 23 | expect(fakerator.replaceSymbols("???-###-???")) 24 | .to.be.equal("arp-306-gxi"); 25 | 26 | }); 27 | 28 | it("check shuffle function", () => { 29 | let arr = [1,2,3,4,5,6,7,8,9]; 30 | 31 | expect(fakerator.shuffle()) 32 | .to.be.undefined; 33 | 34 | expect(fakerator.shuffle(arr)) 35 | .to.be.deep.equal([ 6, 8, 3, 1, 2, 7, 4, 5, 9 ]); 36 | 37 | }); 38 | 39 | }); -------------------------------------------------------------------------------- /test/specs/populate.spec.js: -------------------------------------------------------------------------------- 1 | import { expect } from "chai"; 2 | 3 | import Fakerator from "lib"; 4 | 5 | describe("Fakerator.populate", () => { 6 | 7 | let fakerator; 8 | 9 | beforeEach( () => { 10 | fakerator = new Fakerator(); 11 | fakerator.seed(4278); 12 | }); 13 | 14 | it("check populate", () => { 15 | expect(fakerator.populate("#{names.name}")).to.be.equal("Ross Hansen"); 16 | expect(fakerator.populate("#{address.street}")).to.be.equal("0662 Ferry Drive"); 17 | 18 | expect(fakerator.populate("#{names.firstName} #{names.lastName} #{names.lastName}")).to.be.equal("Victor Stoltenberg Denesik"); 19 | expect(fakerator.populate("#{names.firstName}-###-???")).to.be.equal("Mandy-802-oqs"); 20 | }); 21 | 22 | it("check with sentence", () =>{ 23 | expect(fakerator.populate("Hi, my name is #{names.name}. I was born in #{address.city}, #{address.country}. I am #{date.age} years old.")) 24 | .to.be.equal("Hi, my name is Ross Hansen. I was born in New Roderickstad, Denmark. I am 75 years old."); 25 | 26 | }); 27 | 28 | it("check populate with missing def", () => { 29 | expect(fakerator.populate("#{abcd.xyz}")).to.be.equal("4{abcd.xyz}"); 30 | }); 31 | 32 | }); -------------------------------------------------------------------------------- /test/specs/random.spec.js: -------------------------------------------------------------------------------- 1 | import { expect } from "chai"; 2 | 3 | import Fakerator from "lib"; 4 | 5 | describe("Fakerator.random", () => { 6 | 7 | let fakerator; 8 | 9 | beforeEach( () => { 10 | fakerator = new Fakerator(); 11 | fakerator.seed(4278); 12 | }); 13 | 14 | it("check random.number function", () => { 15 | expect(fakerator.random.number(100)).to.be.equal(50).a("Number"); 16 | expect(fakerator.random.number(80, 100, 80)).to.be.equal(80); 17 | expect(fakerator.random.number(100, 1)).to.be.equal(57); 18 | expect(fakerator.random.number(1, 100, 0.1)).to.be.closeTo(33.4, 0.1); 19 | }); 20 | 21 | it("check random.boolean function", () => { 22 | expect(fakerator.random.boolean()).to.be.a("Boolean"); 23 | expect(fakerator.random.boolean()).to.be.equal(true); 24 | expect(fakerator.random.boolean()).to.be.equal(false); 25 | }); 26 | 27 | it("check random.boolean with likelihood function", () => { 28 | let res = fakerator.times(fakerator.random.boolean, 10, 60); 29 | expect(res).to.include(true).include(false); 30 | 31 | expect(fakerator.times(fakerator.random.boolean, 10, 0)).to.not.include(true); 32 | expect(fakerator.times(fakerator.random.boolean, 10, 100)).to.not.include(false); 33 | }); 34 | 35 | it("check random.digit function", () => { 36 | expect(fakerator.random.digit()).to.be.a("Number"); 37 | expect(fakerator.random.digit()).to.be.equal(4); 38 | expect(fakerator.random.digit()).to.be.equal(5); 39 | }); 40 | 41 | it("check random.letter function", () => { 42 | expect(fakerator.random.letter()).to.be.a("String"); 43 | expect(fakerator.random.letter()).to.be.equal("l"); 44 | expect(fakerator.random.letter()).to.be.equal("o"); 45 | }); 46 | 47 | it("check random.arrayElement function", () => { 48 | let array = [ "apple", "peach", "banana", "lemon", "orange" ]; 49 | expect(fakerator.random.arrayElement(array)).to.be.a("String"); 50 | expect(fakerator.random.arrayElement(array)).to.be.equal("banana"); 51 | expect(fakerator.random.arrayElement(array)).to.be.equal("banana"); 52 | expect(fakerator.random.arrayElement(array)).to.be.equal("peach"); 53 | expect(fakerator.random.arrayElement()).to.be.undefined; 54 | }); 55 | 56 | it("check random.objectElement function", () => { 57 | let obj = { 58 | a: 1, 59 | b: 2, 60 | c: 3, 61 | d: 4 62 | }; 63 | expect(fakerator.random.objectElement(obj)).to.be.an("Object"); 64 | expect(fakerator.random.objectElement(obj)).to.be.deep.equal({ b: 2 }); 65 | expect(fakerator.random.objectElement(obj)).to.be.deep.equal({ c: 3 }); 66 | expect(fakerator.random.objectElement()).to.be.undefined; 67 | }); 68 | 69 | it("check random.masked function", () => { 70 | expect(fakerator.random.masked("aA9*")).to.be.a("String"); 71 | expect(fakerator.random.masked("aaa-AAA_999:***+***")).to.be.equal("aqa-RPG_932:606+vv1"); 72 | expect(fakerator.random.masked("")).to.be.equal(""); 73 | expect(fakerator.random.masked()).to.be.undefined; 74 | }); 75 | 76 | it("check random.hex function", () => { 77 | expect(fakerator.random.hex()).to.be.a.equal("7"); 78 | expect(fakerator.random.hex(8)).to.be.equal("7950a0b9"); 79 | }); 80 | 81 | it("check random.string function", () => { 82 | expect(fakerator.random.string()).to.be.a("String").length(7); 83 | expect(fakerator.random.string(10)).to.be.length(10); 84 | expect(fakerator.random.string({ min: 5, max: 10 })).to.be.length(5); 85 | }); 86 | 87 | }); -------------------------------------------------------------------------------- /test/specs/seed.spec.js: -------------------------------------------------------------------------------- 1 | import { expect } from "chai"; 2 | 3 | import Fakerator from "lib"; 4 | 5 | describe("Fakerator.seed", () => { 6 | 7 | let fakerator = new Fakerator(); 8 | 9 | it("check seed function", () => { 10 | fakerator.seed(4278); 11 | expect(fakerator.random.number(100)).to.be.equal(50); 12 | 13 | fakerator.seed(98765); 14 | expect(fakerator.random.number(100)).to.be.equal(8); 15 | 16 | fakerator.seed(4278); 17 | expect(fakerator.random.number(100)).to.be.equal(50); 18 | }); 19 | 20 | it("check seed with array", () => { 21 | fakerator.seed([42, 78]); 22 | expect(fakerator.random.number(100)).to.be.equal(92); 23 | }); 24 | 25 | }); -------------------------------------------------------------------------------- /test/specs/times.spec.js: -------------------------------------------------------------------------------- 1 | import { expect } from "chai"; 2 | 3 | import Fakerator from "lib"; 4 | 5 | describe("Fakerator.times", () => { 6 | 7 | let fakerator; 8 | 9 | beforeEach( () => { 10 | fakerator = new Fakerator(); 11 | fakerator.seed(4278); 12 | }); 13 | 14 | it("check times function with names", () => { 15 | let res = fakerator.times(fakerator.names.name, 3); 16 | expect(res).to.be.an("Array"); 17 | expect(res).to.be.length(3); 18 | expect(res).to.be.deep.equal([ "Ross Hansen", "Thomas Pfeffer", "Alexis Hauck I" ]); 19 | }); 20 | 21 | it("check times function with random.number", () => { 22 | let res = fakerator.times(fakerator.random.number, 10, 1, 50); 23 | expect(res).to.be.an("Array"); 24 | expect(res).to.be.length(10); 25 | expect(res).to.be.deep.equal( [25, 24, 29, 17, 2, 33, 1, 35, 31, 13] ); 26 | }); 27 | 28 | it("check times function with populate", () => { 29 | let res = fakerator.times(fakerator.populate, 5, "#{internet.userName}", "John"); 30 | expect(res).to.be.an("Array"); 31 | expect(res).to.be.length(5); 32 | expect(res[0]).to.be.equal("john_koelpin"); 33 | }); 34 | 35 | it("check times function with min max", () => { 36 | let res = fakerator.times(fakerator.random.number, { min: 5, max: 8} , 1, 50); 37 | expect(res).to.be.an("Array"); 38 | expect(res.length).to.be.least(5).most(8); 39 | expect(res).to.be.deep.equal( [24, 29, 17, 2, 33, 1] ); 40 | }); 41 | 42 | }); 43 | 44 | describe("Fakerator.utimes", () => { 45 | 46 | let fakerator; 47 | 48 | beforeEach( () => { 49 | fakerator = new Fakerator(); 50 | fakerator.seed(4278); 51 | }); 52 | 53 | it("check utimes function with random.number", () => { 54 | let res = fakerator.utimes(fakerator.random.number, 6, 1, 10); 55 | expect(res).to.be.an("Array"); 56 | expect(res).to.be.length(6); 57 | expect(res).to.be.deep.equal( [5, 6, 4, 1, 7, 3] ); 58 | }); 59 | 60 | it("check utimes function with min max", () => { 61 | let res = fakerator.utimes(fakerator.random.number, { min: 3, max: 8}, 1, 10); 62 | expect(res).to.be.an("Array"); 63 | expect(res).to.be.length(5); 64 | expect(res).to.be.deep.equal( [5, 6, 4, 1, 7] ); 65 | }); 66 | 67 | it("check utimes function with 10 random.number between 1 to 10", () => { 68 | let res = fakerator.utimes(fakerator.random.number, 10, 1, 10); 69 | expect(res).to.be.an("Array"); 70 | expect(res).to.be.length(10); 71 | expect(res).to.be.deep.equal( [5, 6, 4, 1, 7, 3, 10, 2, 9, 8] ); 72 | }); 73 | 74 | it("check utimes function with 10 random.number from 1 to 5 ", () => { 75 | let res = fakerator.utimes(fakerator.random.number, 10, 1, 5); 76 | expect(res).to.be.an("Array"); 77 | expect(res).to.be.length(5); 78 | expect(res).to.be.deep.equal( [3, 2, 1, 4, 5] ); 79 | }); 80 | 81 | }); -------------------------------------------------------------------------------- /vendor/password-generator.js: -------------------------------------------------------------------------------- 1 | /* 2 | * password-generator 3 | * Copyright(c) 2011-2013 Bermi Ferrer 4 | * MIT Licensed 5 | */ 6 | (function (root) { 7 | 8 | var localName, consonant, letter, password, vowel; 9 | letter = /[a-zA-Z]$/; 10 | vowel = /[aeiouAEIOU]$/; 11 | consonant = /[bcdfghjklmnpqrstvwxyzBCDFGHJKLMNPQRSTVWXYZ]$/; 12 | 13 | 14 | // Defines the name of the local variable the passwordGenerator library will use 15 | // this is specially useful if window.passwordGenerator is already being used 16 | // by your application and you want a different name. For example: 17 | // // Declare before including the passwordGenerator library 18 | // var localPasswordGeneratorLibraryName = 'pass'; 19 | localName = "generatePassword", 20 | 21 | password = function (length, memorable, pattern, prefix) { 22 | var char, n; 23 | if (length == null) { 24 | length = 10; 25 | } 26 | if (memorable == null) { 27 | memorable = true; 28 | } 29 | if (pattern == null) { 30 | pattern = /\w/; 31 | } 32 | if (prefix == null) { 33 | prefix = ''; 34 | } 35 | if (prefix.length >= length) { 36 | return prefix; 37 | } 38 | if (memorable) { 39 | if (prefix.match(consonant)) { 40 | pattern = vowel; 41 | } else { 42 | pattern = consonant; 43 | } 44 | } 45 | n = Math.floor(Math.random() * 94) + 33; 46 | char = String.fromCharCode(n); 47 | if (memorable) { 48 | char = char.toLowerCase(); 49 | } 50 | if (!char.match(pattern)) { 51 | return password(length, memorable, pattern, prefix); 52 | } 53 | return password(length, memorable, pattern, "" + prefix + char); 54 | }; 55 | 56 | 57 | ((typeof exports !== 'undefined') ? exports : root)[localName] = password; 58 | if (typeof exports !== 'undefined') { 59 | if (typeof module !== 'undefined' && module.exports) { 60 | module.exports = password; 61 | } 62 | } 63 | 64 | // Establish the root object, `window` in the browser, or `global` on the server. 65 | }(this)); --------------------------------------------------------------------------------