Commit 2e5567c1 authored by Liang Wu's avatar Liang Wu
parents 46466f63 c479113a

Too many changes to show.

To preserve performance only 1000 of 1000+ files are displayed.

<head>
<meta charset="utf-8">
<script src="https://code.jquery.com/jquery-3.4.1.js" integrity="sha256-WpOohJOqMqqyKL9FccASB9O0KwACQJpFTUBLTYOVvVU=" crossorigin="anonymous"></script>
<meta charset="utf-8"/>
<script src="https://code.jquery.com/jquery-3.4.1.js" integrity="sha256-WpOohJOqMqqyKL9FccASB9O0KwACQJpFTUBLTYOVvVU=" crossorigin="anonymous"></script>
<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/1.10.20/css/jquery.dataTables.css">
<script type="text/javascript" charset="utf8" src="https://cdn.datatables.net/1.10.20/js/jquery.dataTables.js"></script>
......@@ -9,7 +9,8 @@
$('#table_aliments').DataTable();
} );
</script>
</head>
</head>
<section id="aliments_contenu" style="display : flex; flex-direction : row; ">
<div style="margin-right:100px">
......@@ -23,6 +24,7 @@
</tr>
</thead>
<tbody>
<tr>
<td>Fromage</td>
<td>Laitage</td>
......@@ -376,17 +378,19 @@
<table>
<tr>
<td>
<form onsubmit="event.preventDefault();onFormSubmit();" autocomplete="off">
<form id="form_aliment" action="api/ajouter_aliment.php" method="POST" >
<div>
<label>Aliment</label>
<input type="text" name="aliment" id="aliment" required>
<input type="text" id="aliment" name="aliment" required>
</div>
<div>
<label>Type d'aliment : </label>
<select id="type" size="1">
<input type="text" id="cat" name="cat" required>
<!-- <select id="type" size="1">
<option value="fruit"> Fruit </option>
<option value="legume"> Legume </option>
</select>
</select> -->
</div>
<div class="form-action-buttons">
<input type="submit" value="Ajouter">
......@@ -394,7 +398,7 @@
</form>
</td>
</tr>
<script src="crud.js"></script>
<!-- <script src="crud.js"></script> -->
</table>
</div>
</section>
\ No newline at end of file
<?php
include("template.php");
$requete="SELECT * FROM ALIMENTS";
$result = $mysqli->query($requete);
$aliments=$result->fetch_all();
json_encode($aliments);
// reponse_json($success, $data);
\ No newline at end of file
<?php
if(isset($_POST["aliment"]) && isset($_POST["cat"])){
$requete="INSERT INTO `ALIMENTS` (`ID_ALIMENT`,`NAME_ALIMENT`, `TYPE_ALIMENT`) VALUES (NULL, '" .$_POST['aliment'] . "', '" . $_POST['cat'] . "')";
$mysqli->query($requete);
$msg="L'aliment a bien été ajouté";
} else{
$msg="Il manque des informations";
}
echo json_encode($msg);
header("Location: aliment.php");
\ No newline at end of file
<?php
try{
DEFINE('DB_USERNAME','charlotte.raulin');
DEFINE('DB_PASSWORD','MIZWqEaY');
DEFINE('DB_HOST','127.0.0.1');
DEFINE('DB_DATABASE','charlotte_raulin');
$mysqli = new mysqli(DB_HOST, DB_USERNAME, DB_PASSWORD, DB_DATABASE);
$retour["success"]=true;
} catch(Exception $e){
$retour["success"]=false;
};
?>
\ No newline at end of file
<?php
header('Content-Type: application/json'); //pour que le navigateur l'affiche dans le format json
include('bdd.php');
// function reponse_json($success, $data, $msgErreur=NULL){
// $array['success']=$_success;
// $array['msg']=$msgErreur;
// $array['result']=$data;
// echo json_encode($msg,$data);
// }
// echo json_encode($aliments);
// $retour = array();
// $retour["aliments"]= array();
// $retour["aliments"][0]["id"] = 1;
// $retour["aliments"][0]["name"] = "Pomme";
// $retour["aliments"][0]["type"] = "Fruit";
// $retour["aliments"][1]["id"] = 2;
// $retour["aliments"][1]["name"] = "Poire";
// $retour["aliments"][1]["type"] = "Fruit";
// `LOGIN`
\ No newline at end of file
{
"aliments":[
{
"id":1,
"name": "Pomme",
"type": "Fruit"
},
{
"id":2,
"name": "Poire",
"type": "Fruit"
},
{
"id":3,
"name": "Courgette",
"type": "Légume"
}
]
}
\ No newline at end of file
{
// Settings
"passfail" : false, // Stop on first error.
"maxerr" : 500, // Maximum errors before stopping.
"multistr" : true,
// Predefined globals whom JSHint will ignore.
"browser" : true, // Standard browser globals e.g. `window`, `document`.
"node" : false,
"rhino" : false,
"couch" : false,
"wsh" : true, // Windows Scripting Host.
"jquery" : true,
"prototypejs" : false,
"mootools" : false,
"dojo" : false,
"predef" : [ // Extra globals.
"__dirname",
"Buffer",
"event",
"exports",
"global",
"logger",
"module",
"process",
"require",
"after",
"afterEach",
"before",
"beforeEach",
"context",
"describe",
"it"
],
// Development.
"debug" : false, // Allow debugger statements e.g. browser breakpoints.
"devel" : true, // Allow development statements e.g. `console.log();`.
// EcmaScript 5.
"es5" : false, // Allow EcmaScript 5 syntax.
"strict" : false, // Require `use strict` pragma in every file.
"globalstrict" : false, // Allow global "use strict" (also enables 'strict').
"asi" : false, // Tolerate Automatic Semicolon Insertion (no semicolons).
"laxbreak" : false, // Tolerate unsafe line breaks e.g. `return [\n] x` without semicolons.
"bitwise" : true, // Prohibit bitwise operators (&, |, ^, etc.).
"boss" : false, // Tolerate assignments inside if, for & while. Usually conditions & loops are for comparison, not assignments.
"curly" : true, // Require {} for every new block or scope.
"eqeqeq" : false, // Require triple equals i.e. `===`.
"eqnull" : false, // Tolerate use of `== null`.
"evil" : false, // Tolerate use of `eval`.
"expr" : false, // Tolerate `ExpressionStatement` as Programs.
"forin" : false, // Tolerate `for in` loops without `hasOwnProperty`.
"immed" : true, // Require immediate invocations to be wrapped in parens e.g. `( function(){}() );`
"latedef" : true, // Prohibit variable use before definition.
"loopfunc" : true, // Allow functions to be defined within loops.
//"maxparams" : 4,
//"maxdepth" : 5,
//"maxcomplexity" : 10,
"noarg" : true, // Prohibit use of `arguments.caller` and `arguments.callee`.
"regexp" : false, // Prohibit `.` and `[^...]` in regular expressions.
"regexdash" : false, // Tolerate unescaped last dash i.e. `[-...]`.
"scripturl" : true, // Tolerate script-targeted URLs.
"shadow" : false, // Allows re-define variables later in code e.g. `var x=1; x=2;`.
"supernew" : false, // Tolerate `new function () { ... };` and `new Object;`.
"undef" : true, // Require all non-global variables be declared before they are used.
"newcap" : false, // Require capitalization of all constructor functions e.g. `new F()`.
"noempty" : true, // Prohibit use of empty blocks.
"nonew" : false, // Prohibit use of constructors for side-effects.
"nomen" : false, // Prohibit use of initial or trailing underbars in names.
"onevar" : false, // Allow only one `var` statement per function.
"plusplus" : false, // Prohibit use of `++` & `--`.
"sub" : true, // Tolerate all forms of subscript notation besides dot notation e.g. `dict['key']` instead of `dict.key`.
"trailing" : true, // Prohibit trailing whitespaces. (only works if white is 'true')
"white" : true, // Check against strict whitespace and indentation rules.
"indent" : 4 //
}
.npm/
build/
doc/
examples/
meteor/
test/
logo.png
# Run on new travis container (docker) based infrastructure
sudo: false
language: node_js
node_js:
- "5"
- "5.1"
- "4"
- "4.2"
- "4.1"
- "4.0"
- "0.12"
- "0.11"
- "0.10"
- "iojs"
before_install:
# Install meteor and spacejam, a meteor command line package tester
- 'if [ "$(node -v)" = "v0.10.36" ]; then curl https://install.meteor.com | /bin/sh; fi'
- 'if [ "$(node -v)" = "v0.10.36" ]; then npm install -g spacejam; fi'
- 'if [ "$(node -v)" = "v0.10.36" ]; then export PATH="$HOME/.meteor:$PATH"; fi'
script:
- "npm test"
- 'if [ "$(node -v)" = "v0.10.36" ]; then spacejam test-packages --mongo-url=dummy ./; fi'
base64@1.0.3
binary-heap@1.0.3
callback-hook@1.0.3
check@1.0.5
coffeescript@1.0.6
ddp@1.1.0
ejson@1.0.6
geojson-utils@1.0.3
id-map@1.0.3
json@1.0.3
local-test:practicalmeteor:faker@2.1.1_1
logging@1.0.7
meteor@1.1.6
minimongo@1.0.8
mongo@1.1.0
ordered-dict@1.0.3
practicalmeteor:chai@2.1.0_1
practicalmeteor:faker@2.1.1_1
random@1.0.3
retry@1.0.3
tinytest@1.0.5
tracker@1.0.7
underscore@1.0.3
# CHANGELOG
See commit history on Github for change history
http://github.com/marak/faker.js
## v3.1.0
( partial change log see: https://github.com/Marak/faker.js/commits/master for full details )
```
[docs] Added JSDocs
[fix] Prevent apostrophes in return value of internet#domainWords
[Fix] Display first month as 1 not 0.
[fix] random.uuid not using seeded number generator
[fix] image api size check
[fix] update bower
[fix] implement street suffix
[fix] hacker.phrase - generate random string for each lexical instance
[api] Added safe_email method
[api] Added method for getting random locale
[api] Added semver method
[api] Added parameters to fake method
[api] Added randomness to image generation
[api] adjust findName method to allow for gender based prefixes
[api] [locale] Added basic support for generating UK postcodes
[api] [locale] Added LV (Latvian) locale
[api] [locale] Added date for Swedish locale
[api] Added better lorem methods
[api] Added system module
[api] Added finance.bitcoinAddress
```
## v3.0.0 - v2.0.0 - Missing
See commit history on Github for change history
http://github.com/marak/faker.js
## v2.0.0
* Adds i18n internalization of fake data sets
- contributed by Marak
* Reduces surface of API, removes redundant API calls
- contributed by Marak
* Replaces legacy build system with GulpJS
- contributed by Marak
* Replaces legacy browserifying system with Browserify
- contributed by Marak
* Adds basic financial generators
- contributed by josefsalyer
* Adds internet.userAgent using `random-ua` library
- contributed by Marak
* Adds currency codes and symbols using `random-ua` library
- contributed by MQuy
* Replaces use of Math.random in favor of `node-mersenne` package
- contributed by Marak
* Adds bower support
- contributed by daytonn
* avatarUrl optimization
- contributed by MQuy
* Fix - Remove `this` scope
- contributed by goliatone
* Fix - IE9 charAt() bug
- contributed by beastlike
* Fix - faker.date now returns a Date object instead of JSON
- contributed by Marak
##v1.1.0
* Fixes random date functions that did not distribute results.
- contributed by pmalouin
* Fixes context of findName
- contributed by juampi92
* Updates to switch changes over to using 2 args to support min/max
- contributed by avanderhoorn & edshadi
* Added ISO 3166 countries
- contributed by MaerF0x0
* UMD support
- contirbuted by xaka
* Uk Postal Codes
- contributed by schmtw
* Undefined global object for webworker fix
- contributed by dnbard
\ No newline at end of file
A lot of effort has been put into `faker.js` to create a useful and handy
library. There are still a lot of things to be done, so all contributions are
welcome! If you can make `faker.js` better, please read the following contribution guide.
# Important
* Please make sure that you run both `gulp` and tests before making a PR.
## Support
`faker.js` relies on [commonJS](http://www.commonjs.org/) standard and supports both node.js and the
browsers. Keep this in mind, when modifying and/or extending the sources.
## Automation
* The project is being built by [gulp](http://gulpjs.com/) (see [gulpfile](build/gulpfile.js)), destination directory is [build/build](build/build)
* The documentation is auto-generated, based on [build/src](build/src) markdown sources. If you modify the main [Readme.md](Readme.md) file, the Pull Request will be rejected, since it will be overwritten by the upcoming `gulp` execution
* The tests are executing `mocha` against all js contents of [test](test) directory
## Architecture
The sources are located in the [lib](lib) directory. All fake data generators are
divided into namespaces (each namespace being a separate module). Most of the
generators use the *definitions*, which are just plain JavaScript
objects/arrays/strings that are separate for each [locale](lib/locales).
faker.js - Copyright (c) 2010-2015
Matthew Bergman & Marak Squires
http://github.com/marak/faker.js/
faker.js was inspired by and has used data definitions from:
* https://github.com/stympy/faker/ - Copyright (c) 2007-2010 Benjamin Curtis
* http://search.cpan.org/~jasonk/Data-Faker-0.07/ - Copyright 2004-2005 by Jason Kohles
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
\ No newline at end of file
# faker.js - generate massive amounts of fake data in the browser and node.js
![Faker.js](http://imgur.com/KiinQ.png)
[![Build Status](https://travis-ci.org/Marak/faker.js.svg?branch=master)](https://travis-ci.org/Marak/faker.js)
[![npm version](https://badge.fury.io/js/faker.svg)](http://badge.fury.io/js/faker)
## Demo
[https://cdn.rawgit.com/Marak/faker.js/master/examples/browser/index.html](https://cdn.rawgit.com/Marak/faker.js/master/examples/browser/index.html)
## Hosted API Microservice
[http://faker.hook.io](http://faker.hook.io/)
- Supports all Faker API Methods
- Full-Featured Microservice
- Hosted by [hook.io](http://hook.io)
```bash
curl http://faker.hook.io?property=name.findName&locale=de
```
## Usage
### Browser
<script src = "faker.js" type = "text/javascript"></script>
<script>
var randomName = faker.name.findName(); // Caitlyn Kerluke
var randomEmail = faker.internet.email(); // Rusty@arne.info
var randomCard = faker.helpers.createCard(); // random contact card containing many properties
</script>
### Node.js
var faker = require('faker');
var randomName = faker.name.findName(); // Rowan Nikolaus
var randomEmail = faker.internet.email(); // Kassandra.Haley@erich.biz
var randomCard = faker.helpers.createCard(); // random contact card containing many properties
## API
### Faker.fake()
faker.js contains a super useful generator method `Faker.fake` for combining faker API methods using a mustache string format.
**Example:**
``` js
console.log(faker.fake("{{name.lastName}}, {{name.firstName}} {{name.suffix}}"));
// outputs: "Marks, Dean Sr."
```
This will interpolate the format string with the value of methods `name.lastName()`, `name.firstName()`, and `name.suffix()`
### JSDoc API Browser
[http://marak.github.io/faker.js/](http://marak.github.io/faker.js/)
### API Methods
* address
* zipCode
* city
* cityPrefix
* citySuffix
* streetName
* streetAddress
* streetSuffix
* streetPrefix
* secondaryAddress
* county
* country
* countryCode
* state
* stateAbbr
* latitude
* longitude
* commerce
* color
* department
* productName
* price
* productAdjective
* productMaterial
* product
* company
* suffixes
* companyName
* companySuffix
* catchPhrase
* bs
* catchPhraseAdjective
* catchPhraseDescriptor
* catchPhraseNoun
* bsAdjective
* bsBuzz
* bsNoun
* database
* column
* type
* collation
* engine
* date
* past
* future
* between
* recent
* month
* weekday
* fake
* finance
* account
* accountName
* mask
* amount
* transactionType
* currencyCode
* currencyName
* currencySymbol
* bitcoinAddress
* iban
* bic
* hacker
* abbreviation
* adjective
* noun
* verb
* ingverb
* phrase
* helpers
* randomize
* slugify
* replaceSymbolWithNumber
* replaceSymbols
* shuffle
* mustache
* createCard
* contextualCard
* userCard
* createTransaction
* image
* image
* avatar
* imageUrl
* abstract
* animals
* business
* cats
* city
* food
* nightlife
* fashion
* people
* nature
* sports
* technics
* transport
* dataUri
* internet
* avatar
* email
* exampleEmail
* userName
* protocol
* url
* domainName
* domainSuffix
* domainWord
* ip
* ipv6
* userAgent
* color
* mac
* password
* lorem
* word
* words
* sentence
* slug
* sentences
* paragraph
* paragraphs
* text
* lines
* name
* firstName
* lastName
* findName
* jobTitle
* prefix
* suffix
* title
* jobDescriptor
* jobArea
* jobType
* phone
* phoneNumber
* phoneNumberFormat
* phoneFormats
* random
* number
* arrayElement
* objectElement
* uuid
* boolean
* word
* words
* image
* locale
* alphaNumeric
* system
* fileName
* commonFileName
* mimeType
* commonFileType
* commonFileExt
* fileType
* fileExt
* directoryPath
* filePath
* semver
## Localization
As of version `v2.0.0` faker.js has support for multiple localities.
The default language locale is set to English.
Setting a new locale is simple:
```js
// sets locale to de
faker.locale = "de";
```
* az
* cz
* de
* de_AT
* de_CH
* en
* en_AU
* en_BORK
* en_CA
* en_GB
* en_IE
* en_IND
* en_US
* en_au_ocker
* es
* es_MX
* fa
* fr
* fr_CA
* ge
* id_ID
* it
* ja
* ko
* nb_NO
* nep
* nl
* pl
* pt_BR
* ru
* sk
* sv
* tr
* uk
* vi
* zh_CN
* zh_TW
### Individual Localization Packages
As of vesion `v3.0.0` faker.js supports incremental loading of locales.
By default, requiring `faker` will include *all* locale data.
In a production environment, you may only want to include the locale data for a specific set of locales.
```js
// loads only de locale
var faker = require('faker/locale/de');
```
## Setting a randomness seed
If you want consistent results, you can set your own seed:
```js
faker.seed(123);
var firstRandom = faker.random.number();
// Setting the seed again resets the sequence.
faker.seed(123);
var secondRandom = faker.random.number();
console.log(firstRandom === secondRandom);
```
## Tests
npm install .
make test
You can view a code coverage report generated in coverage/lcov-report/index.html.
## Projects Built with faker.js
### Fake JSON Schema
Use faker generators to populate JSON Schema samples.
See: https://github.com/pateketrueke/json-schema-faker/
### CLI
Run faker generators from Command Line.
See: https://github.com/lestoni/faker-cli
**Want to see your project added here? Let us know!**
### Meteor
#### Meteor Installation
```
meteor add practicalmeteor:faker
```
#### Meteor Usage, both client and server
```js
var randomName = faker.name.findName(); // Rowan Nikolaus
var randomEmail = faker.internet.email(); // Kassandra.Haley@erich.biz
var randomCard = faker.helpers.createCard(); // random contact card containing many properties
```
## Building faker.js
faker uses [gulp](http://gulpjs.com/) to automate it's build process. Running the following build command will generate new browser builds, documentation, and code examples for the project.
```
npm run-script build
```
## Building JSDocs
```
npm run-script doc
```
## Version Release Schedule
faker.js is a popular project used by many organizations and individuals in production settings. Major and Minor version releases are generally on a monthly schedule. Bugs fixes are addressed by severity and fixed as soon as possible.
If you require the absolute latest version of `faker.js` the `master` branch @ http://github.com/marak/faker.js/ should always be up to date and working.
## Maintainer
#### Marak Squires
faker.js - Copyright (c) 2017
Marak Squires
http://github.com/marak/faker.js/
faker.js was inspired by and has used data definitions from:
* https://github.com/stympy/faker/ - Copyright (c) 2007-2010 Benjamin Curtis
* http://search.cpan.org/~jasonk/Data-Faker-0.07/ - Copyright 2004-2005 by Jason Kohles
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
{
"name": "faker",
"main": "./build/build/faker.js",
"homepage": "https://github.com/Marak/faker.js",
"authors": [
"Marak Squires <marak.squires@gmail.com>",
"Matthew Bergman <matt@novafabrica.com>"
],
"description": "Generate massive amounts of fake contextual data",
"keywords": [
"faker",
"fake",
"dummy",
"identity",
"test"
],
"license": "MIT",
"ignore": [
"**/.*",
"node_modules",
"bower_components",
"test"
]
}
{
"opts": {
"destination": "../doc/"
},
"plugins": [
"plugins/markdown"
]
}
// since we are requiring the top level of faker, load all locales by default
var Faker = require('./lib');
var faker = new Faker({ locales: require('./lib/locales') });
module['exports'] = faker;
\ No newline at end of file
/**
*
* @namespace faker.address
*/
function Address (faker) {
var f = faker.fake,
Helpers = faker.helpers;
/**
* Generates random zipcode from format. If format is not specified, the
* locale's zip format is used.
*
* @method faker.address.zipCode
* @param {String} format
*/
this.zipCode = function(format) {
// if zip format is not specified, use the zip format defined for the locale
if (typeof format === 'undefined') {
var localeFormat = faker.definitions.address.postcode;
if (typeof localeFormat === 'string') {
format = localeFormat;
} else {
format = faker.random.arrayElement(localeFormat);
}
}
return Helpers.replaceSymbols(format);
}
/**
* Generates a random localized city name. The format string can contain any
* method provided by faker wrapped in `{{}}`, e.g. `{{name.firstName}}` in
* order to build the city name.
*
* If no format string is provided one of the following is randomly used:
*
* * `{{address.cityPrefix}} {{name.firstName}}{{address.citySuffix}}`
* * `{{address.cityPrefix}} {{name.firstName}}`
* * `{{name.firstName}}{{address.citySuffix}}`
* * `{{name.lastName}}{{address.citySuffix}}`
*
* @method faker.address.city
* @param {String} format
*/
this.city = function (format) {
var formats = [
'{{address.cityPrefix}} {{name.firstName}}{{address.citySuffix}}',
'{{address.cityPrefix}} {{name.firstName}}',
'{{name.firstName}}{{address.citySuffix}}',
'{{name.lastName}}{{address.citySuffix}}'
];
if (typeof format !== "number") {
format = faker.random.number(formats.length - 1);
}
return f(formats[format]);
}
/**
* Return a random localized city prefix
* @method faker.address.cityPrefix
*/
this.cityPrefix = function () {
return faker.random.arrayElement(faker.definitions.address.city_prefix);
}
/**
* Return a random localized city suffix
*
* @method faker.address.citySuffix
*/
this.citySuffix = function () {
return faker.random.arrayElement(faker.definitions.address.city_suffix);
}
/**
* Returns a random localized street name
*
* @method faker.address.streetName
*/
this.streetName = function () {
var result;
var suffix = faker.address.streetSuffix();
if (suffix !== "") {
suffix = " " + suffix
}
switch (faker.random.number(1)) {
case 0:
result = faker.name.lastName() + suffix;
break;
case 1:
result = faker.name.firstName() + suffix;
break;
}
return result;
}
//
// TODO: change all these methods that accept a boolean to instead accept an options hash.
//
/**
* Returns a random localized street address
*
* @method faker.address.streetAddress
* @param {Boolean} useFullAddress
*/
this.streetAddress = function (useFullAddress) {
if (useFullAddress === undefined) { useFullAddress = false; }
var address = "";
switch (faker.random.number(2)) {
case 0:
address = Helpers.replaceSymbolWithNumber("#####") + " " + faker.address.streetName();
break;
case 1:
address = Helpers.replaceSymbolWithNumber("####") + " " + faker.address.streetName();
break;
case 2:
address = Helpers.replaceSymbolWithNumber("###") + " " + faker.address.streetName();
break;
}
return useFullAddress ? (address + " " + faker.address.secondaryAddress()) : address;
}
/**
* streetSuffix
*
* @method faker.address.streetSuffix
*/
this.streetSuffix = function () {
return faker.random.arrayElement(faker.definitions.address.street_suffix);
}
/**
* streetPrefix
*
* @method faker.address.streetPrefix
*/
this.streetPrefix = function () {
return faker.random.arrayElement(faker.definitions.address.street_prefix);
}
/**
* secondaryAddress
*
* @method faker.address.secondaryAddress
*/
this.secondaryAddress = function () {
return Helpers.replaceSymbolWithNumber(faker.random.arrayElement(
[
'Apt. ###',
'Suite ###'
]
));
}
/**
* county
*
* @method faker.address.county
*/
this.county = function () {
return faker.random.arrayElement(faker.definitions.address.county);
}
/**
* country
*
* @method faker.address.country
*/
this.country = function () {
return faker.random.arrayElement(faker.definitions.address.country);
}
/**
* countryCode
*
* @method faker.address.countryCode
*/
this.countryCode = function () {
return faker.random.arrayElement(faker.definitions.address.country_code);
}
/**
* state
*
* @method faker.address.state
* @param {Boolean} useAbbr
*/
this.state = function (useAbbr) {
return faker.random.arrayElement(faker.definitions.address.state);
}
/**
* stateAbbr
*
* @method faker.address.stateAbbr
*/
this.stateAbbr = function () {
return faker.random.arrayElement(faker.definitions.address.state_abbr);
}
/**
* latitude
*
* @method faker.address.latitude
*/
this.latitude = function () {
return (faker.random.number(180 * 10000) / 10000.0 - 90.0).toFixed(4);
}
/**
* longitude
*
* @method faker.address.longitude
*/
this.longitude = function () {
return (faker.random.number(360 * 10000) / 10000.0 - 180.0).toFixed(4);
}
return this;
}
module.exports = Address;
/**
*
* @namespace faker.commerce
*/
var Commerce = function (faker) {
var self = this;
/**
* color
*
* @method faker.commerce.color
*/
self.color = function() {
return faker.random.arrayElement(faker.definitions.commerce.color);
};
/**
* department
*
* @method faker.commerce.department
*/
self.department = function() {
return faker.random.arrayElement(faker.definitions.commerce.department);
};
/**
* productName
*
* @method faker.commerce.productName
*/
self.productName = function() {
return faker.commerce.productAdjective() + " " +
faker.commerce.productMaterial() + " " +
faker.commerce.product();
};
/**
* price
*
* @method faker.commerce.price
* @param {number} min
* @param {number} max
* @param {number} dec
* @param {string} symbol
*
* @return {string}
*/
self.price = function(min, max, dec, symbol) {
min = min || 0;
max = max || 1000;
dec = dec === undefined ? 2 : dec;
symbol = symbol || '';
if (min < 0 || max < 0) {
return symbol + 0.00;
}
var randValue = faker.random.number({ max: max, min: min });
return symbol + (Math.round(randValue * Math.pow(10, dec)) / Math.pow(10, dec)).toFixed(dec);
};
/*
self.categories = function(num) {
var categories = [];
do {
var category = faker.random.arrayElement(faker.definitions.commerce.department);
if(categories.indexOf(category) === -1) {
categories.push(category);
}
} while(categories.length < num);
return categories;
};
*/
/*
self.mergeCategories = function(categories) {
var separator = faker.definitions.separator || " &";
// TODO: find undefined here
categories = categories || faker.definitions.commerce.categories;
var commaSeparated = categories.slice(0, -1).join(', ');
return [commaSeparated, categories[categories.length - 1]].join(separator + " ");
};
*/
/**
* productAdjective
*
* @method faker.commerce.productAdjective
*/
self.productAdjective = function() {
return faker.random.arrayElement(faker.definitions.commerce.product_name.adjective);
};
/**
* productMaterial
*
* @method faker.commerce.productMaterial
*/
self.productMaterial = function() {
return faker.random.arrayElement(faker.definitions.commerce.product_name.material);
};
/**
* product
*
* @method faker.commerce.product
*/
self.product = function() {
return faker.random.arrayElement(faker.definitions.commerce.product_name.product);
};
return self;
};
module['exports'] = Commerce;
/**
*
* @namespace faker.company
*/
var Company = function (faker) {
var self = this;
var f = faker.fake;
/**
* suffixes
*
* @method faker.company.suffixes
*/
this.suffixes = function () {
// Don't want the source array exposed to modification, so return a copy
return faker.definitions.company.suffix.slice(0);
}
/**
* companyName
*
* @method faker.company.companyName
* @param {string} format
*/
this.companyName = function (format) {
var formats = [
'{{name.lastName}} {{company.companySuffix}}',
'{{name.lastName}} - {{name.lastName}}',
'{{name.lastName}}, {{name.lastName}} and {{name.lastName}}'
];
if (typeof format !== "number") {
format = faker.random.number(formats.length - 1);
}
return f(formats[format]);
}
/**
* companySuffix
*
* @method faker.company.companySuffix
*/
this.companySuffix = function () {
return faker.random.arrayElement(faker.company.suffixes());
}
/**
* catchPhrase
*
* @method faker.company.catchPhrase
*/
this.catchPhrase = function () {
return f('{{company.catchPhraseAdjective}} {{company.catchPhraseDescriptor}} {{company.catchPhraseNoun}}')
}
/**
* bs
*
* @method faker.company.bs
*/
this.bs = function () {
return f('{{company.bsAdjective}} {{company.bsBuzz}} {{company.bsNoun}}');
}
/**
* catchPhraseAdjective
*
* @method faker.company.catchPhraseAdjective
*/
this.catchPhraseAdjective = function () {
return faker.random.arrayElement(faker.definitions.company.adjective);
}
/**
* catchPhraseDescriptor
*
* @method faker.company.catchPhraseDescriptor
*/
this.catchPhraseDescriptor = function () {
return faker.random.arrayElement(faker.definitions.company.descriptor);
}
/**
* catchPhraseNoun
*
* @method faker.company.catchPhraseNoun
*/
this.catchPhraseNoun = function () {
return faker.random.arrayElement(faker.definitions.company.noun);
}
/**
* bsAdjective
*
* @method faker.company.bsAdjective
*/
this.bsAdjective = function () {
return faker.random.arrayElement(faker.definitions.company.bs_adjective);
}
/**
* bsBuzz
*
* @method faker.company.bsBuzz
*/
this.bsBuzz = function () {
return faker.random.arrayElement(faker.definitions.company.bs_verb);
}
/**
* bsNoun
*
* @method faker.company.bsNoun
*/
this.bsNoun = function () {
return faker.random.arrayElement(faker.definitions.company.bs_noun);
}
}
module['exports'] = Company;
\ No newline at end of file
/**
*
* @namespace faker.database
*/
var Database = function (faker) {
var self = this;
/**
* column
*
* @method faker.database.column
*/
self.column = function () {
return faker.random.arrayElement(faker.definitions.database.column);
};
self.column.schema = {
"description": "Generates a column name.",
"sampleResults": ["id", "title", "createdAt"]
};
/**
* type
*
* @method faker.database.type
*/
self.type = function () {
return faker.random.arrayElement(faker.definitions.database.type);
};
self.type.schema = {
"description": "Generates a column type.",
"sampleResults": ["byte", "int", "varchar", "timestamp"]
};
/**
* collation
*
* @method faker.database.collation
*/
self.collation = function () {
return faker.random.arrayElement(faker.definitions.database.collation);
};
self.collation.schema = {
"description": "Generates a collation.",
"sampleResults": ["utf8_unicode_ci", "utf8_bin"]
};
/**
* engine
*
* @method faker.database.engine
*/
self.engine = function () {
return faker.random.arrayElement(faker.definitions.database.engine);
};
self.engine.schema = {
"description": "Generates a storage engine.",
"sampleResults": ["MyISAM", "InnoDB"]
};
};
module["exports"] = Database;
/**
*
* @namespace faker.date
*/
var _Date = function (faker) {
var self = this;
/**
* past
*
* @method faker.date.past
* @param {number} years
* @param {date} refDate
*/
self.past = function (years, refDate) {
var date = (refDate) ? new Date(Date.parse(refDate)) : new Date();
var range = {
min: 1000,
max: (years || 1) * 365 * 24 * 3600 * 1000
};
var past = date.getTime();
past -= faker.random.number(range); // some time from now to N years ago, in milliseconds
date.setTime(past);
return date;
};
/**
* future
*
* @method faker.date.future
* @param {number} years
* @param {date} refDate
*/
self.future = function (years, refDate) {
var date = (refDate) ? new Date(Date.parse(refDate)) : new Date();
var range = {
min: 1000,
max: (years || 1) * 365 * 24 * 3600 * 1000
};
var future = date.getTime();
future += faker.random.number(range); // some time from now to N years later, in milliseconds
date.setTime(future);
return date;
};
/**
* between
*
* @method faker.date.between
* @param {date} from
* @param {date} to
*/
self.between = function (from, to) {
var fromMilli = Date.parse(from);
var dateOffset = faker.random.number(Date.parse(to) - fromMilli);
var newDate = new Date(fromMilli + dateOffset);
return newDate;
};
/**
* recent
*
* @method faker.date.recent
* @param {number} days
*/
self.recent = function (days) {
var date = new Date();
var range = {
min: 1000,
max: (days || 1) * 24 * 3600 * 1000
};
var future = date.getTime();
future -= faker.random.number(range); // some time from now to N days ago, in milliseconds
date.setTime(future);
return date;
};
/**
* month
*
* @method faker.date.month
* @param {object} options
*/
self.month = function (options) {
options = options || {};
var type = 'wide';
if (options.abbr) {
type = 'abbr';
}
if (options.context && typeof faker.definitions.date.month[type + '_context'] !== 'undefined') {
type += '_context';
}
var source = faker.definitions.date.month[type];
return faker.random.arrayElement(source);
};
/**
* weekday
*
* @param {object} options
* @method faker.date.weekday
*/
self.weekday = function (options) {
options = options || {};
var type = 'wide';
if (options.abbr) {
type = 'abbr';
}
if (options.context && typeof faker.definitions.date.weekday[type + '_context'] !== 'undefined') {
type += '_context';
}
var source = faker.definitions.date.weekday[type];
return faker.random.arrayElement(source);
};
return self;
};
module['exports'] = _Date;
\ No newline at end of file
/*
fake.js - generator method for combining faker methods based on string input
*/
function Fake (faker) {
/**
* Generator method for combining faker methods based on string input
*
* __Example:__
*
* ```
* console.log(faker.fake('{{name.lastName}}, {{name.firstName}} {{name.suffix}}'));
* //outputs: "Marks, Dean Sr."
* ```
*
* This will interpolate the format string with the value of methods
* [name.lastName]{@link faker.name.lastName}, [name.firstName]{@link faker.name.firstName},
* and [name.suffix]{@link faker.name.suffix}
*
* @method faker.fake
* @param {string} str
*/
this.fake = function fake (str) {
// setup default response as empty string
var res = '';
// if incoming str parameter is not provided, return error message
if (typeof str !== 'string' || str.length === 0) {
res = 'string parameter is required!';
return res;
}
// find first matching {{ and }}
var start = str.search('{{');
var end = str.search('}}');
// if no {{ and }} is found, we are done
if (start === -1 && end === -1) {
return str;
}
// console.log('attempting to parse', str);
// extract method name from between the {{ }} that we found
// for example: {{name.firstName}}
var token = str.substr(start + 2, end - start - 2);
var method = token.replace('}}', '').replace('{{', '');
// console.log('method', method)
// extract method parameters
var regExp = /\(([^)]+)\)/;
var matches = regExp.exec(method);
var parameters = '';
if (matches) {
method = method.replace(regExp, '');
parameters = matches[1];
}
// split the method into module and function
var parts = method.split('.');
if (typeof faker[parts[0]] === "undefined") {
throw new Error('Invalid module: ' + parts[0]);
}
if (typeof faker[parts[0]][parts[1]] === "undefined") {
throw new Error('Invalid method: ' + parts[0] + "." + parts[1]);
}
// assign the function from the module.function namespace
var fn = faker[parts[0]][parts[1]];
// If parameters are populated here, they are always going to be of string type
// since we might actually be dealing with an object or array,
// we always attempt to the parse the incoming parameters into JSON
var params;
// Note: we experience a small performance hit here due to JSON.parse try / catch
// If anyone actually needs to optimize this specific code path, please open a support issue on github
try {
params = JSON.parse(parameters)
} catch (err) {
// since JSON.parse threw an error, assume parameters was actually a string
params = parameters;
}
var result;
if (typeof params === "string" && params.length === 0) {
result = fn.call(this);
} else {
result = fn.call(this, params);
}
// replace the found tag with the returned fake value
res = str.replace('{{' + token + '}}', result);
// return the response recursively until we are done finding all tags
return fake(res);
}
return this;
}
module['exports'] = Fake;
\ No newline at end of file
/**
* @namespace faker.finance
*/
var Finance = function (faker) {
var ibanLib = require("./iban");
var Helpers = faker.helpers,
self = this;
/**
* account
*
* @method faker.finance.account
* @param {number} length
*/
self.account = function (length) {
length = length || 8;
var template = '';
for (var i = 0; i < length; i++) {
template = template + '#';
}
length = null;
return Helpers.replaceSymbolWithNumber(template);
};
/**
* accountName
*
* @method faker.finance.accountName
*/
self.accountName = function () {
return [Helpers.randomize(faker.definitions.finance.account_type), 'Account'].join(' ');
};
/**
* mask
*
* @method faker.finance.mask
* @param {number} length
* @param {boolean} parens
* @param {boolean} ellipsis
*/
self.mask = function (length, parens, ellipsis) {
//set defaults
length = (length == 0 || !length || typeof length == 'undefined') ? 4 : length;
parens = (parens === null) ? true : parens;
ellipsis = (ellipsis === null) ? true : ellipsis;
//create a template for length
var template = '';
for (var i = 0; i < length; i++) {
template = template + '#';
}
//prefix with ellipsis
template = (ellipsis) ? ['...', template].join('') : template;
template = (parens) ? ['(', template, ')'].join('') : template;
//generate random numbers
template = Helpers.replaceSymbolWithNumber(template);
return template;
};
//min and max take in minimum and maximum amounts, dec is the decimal place you want rounded to, symbol is $, €, £, etc
//NOTE: this returns a string representation of the value, if you want a number use parseFloat and no symbol
/**
* amount
*
* @method faker.finance.amount
* @param {number} min
* @param {number} max
* @param {number} dec
* @param {string} symbol
*
* @return {string}
*/
self.amount = function (min, max, dec, symbol) {
min = min || 0;
max = max || 1000;
dec = dec === undefined ? 2 : dec;
symbol = symbol || '';
var randValue = faker.random.number({ max: max, min: min, precision: Math.pow(10, -dec) });
return symbol + randValue.toFixed(dec);
};
/**
* transactionType
*
* @method faker.finance.transactionType
*/
self.transactionType = function () {
return Helpers.randomize(faker.definitions.finance.transaction_type);
};
/**
* currencyCode
*
* @method faker.finance.currencyCode
*/
self.currencyCode = function () {
return faker.random.objectElement(faker.definitions.finance.currency)['code'];
};
/**
* currencyName
*
* @method faker.finance.currencyName
*/
self.currencyName = function () {
return faker.random.objectElement(faker.definitions.finance.currency, 'key');
};
/**
* currencySymbol
*
* @method faker.finance.currencySymbol
*/
self.currencySymbol = function () {
var symbol;
while (!symbol) {
symbol = faker.random.objectElement(faker.definitions.finance.currency)['symbol'];
}
return symbol;
};
/**
* bitcoinAddress
*
* @method faker.finance.bitcoinAddress
*/
self.bitcoinAddress = function () {
var addressLength = faker.random.number({ min: 27, max: 34 });
var address = faker.random.arrayElement(['1', '3']);
for (var i = 0; i < addressLength - 1; i++)
address += faker.random.alphaNumeric().toUpperCase();
return address;
};
/**
* iban
*
* @method faker.finance.iban
*/
self.iban = function (formatted) {
var ibanFormat = faker.random.arrayElement(ibanLib.formats);
var s = "";
var count = 0;
for (var b = 0; b < ibanFormat.bban.length; b++) {
var bban = ibanFormat.bban[b];
var c = bban.count;
count += bban.count;
while (c > 0) {
if (bban.type == "a") {
s += faker.random.arrayElement(ibanLib.alpha);
} else if (bban.type == "c") {
if (faker.random.number(100) < 80) {
s += faker.random.number(9);
} else {
s += faker.random.arrayElement(ibanLib.alpha);
}
} else {
if (c >= 3 && faker.random.number(100) < 30) {
if (faker.random.boolean()) {
s += faker.random.arrayElement(ibanLib.pattern100);
c -= 2;
} else {
s += faker.random.arrayElement(ibanLib.pattern10);
c--;
}
} else {
s += faker.random.number(9);
}
}
c--;
}
s = s.substring(0, count);
}
var checksum = 98 - ibanLib.mod97(ibanLib.toDigitString(s + ibanFormat.country + "00"));
if (checksum < 10) {
checksum = "0" + checksum;
}
var iban = ibanFormat.country + checksum + s;
return formatted ? iban.match(/.{1,4}/g).join(" ") : iban;
};
/**
* bic
*
* @method faker.finance.bic
*/
self.bic = function () {
var vowels = ["A", "E", "I", "O", "U"];
var prob = faker.random.number(100);
return Helpers.replaceSymbols("???") +
faker.random.arrayElement(vowels) +
faker.random.arrayElement(ibanLib.iso3166) +
Helpers.replaceSymbols("?") + "1" +
(prob < 10 ?
Helpers.replaceSymbols("?" + faker.random.arrayElement(vowels) + "?") :
prob < 40 ?
Helpers.replaceSymbols("###") : "");
};
};
module['exports'] = Finance;
/**
*
* @namespace faker.hacker
*/
var Hacker = function (faker) {
var self = this;
/**
* abbreviation
*
* @method faker.hacker.abbreviation
*/
self.abbreviation = function () {
return faker.random.arrayElement(faker.definitions.hacker.abbreviation);
};
/**
* adjective
*
* @method faker.hacker.adjective
*/
self.adjective = function () {
return faker.random.arrayElement(faker.definitions.hacker.adjective);
};
/**
* noun
*
* @method faker.hacker.noun
*/
self.noun = function () {
return faker.random.arrayElement(faker.definitions.hacker.noun);
};
/**
* verb
*
* @method faker.hacker.verb
*/
self.verb = function () {
return faker.random.arrayElement(faker.definitions.hacker.verb);
};
/**
* ingverb
*
* @method faker.hacker.ingverb
*/
self.ingverb = function () {
return faker.random.arrayElement(faker.definitions.hacker.ingverb);
};
/**
* phrase
*
* @method faker.hacker.phrase
*/
self.phrase = function () {
var data = {
abbreviation: self.abbreviation,
adjective: self.adjective,
ingverb: self.ingverb,
noun: self.noun,
verb: self.verb
};
var phrase = faker.random.arrayElement([ "If we {{verb}} the {{noun}}, we can get to the {{abbreviation}} {{noun}} through the {{adjective}} {{abbreviation}} {{noun}}!",
"We need to {{verb}} the {{adjective}} {{abbreviation}} {{noun}}!",
"Try to {{verb}} the {{abbreviation}} {{noun}}, maybe it will {{verb}} the {{adjective}} {{noun}}!",
"You can't {{verb}} the {{noun}} without {{ingverb}} the {{adjective}} {{abbreviation}} {{noun}}!",
"Use the {{adjective}} {{abbreviation}} {{noun}}, then you can {{verb}} the {{adjective}} {{noun}}!",
"The {{abbreviation}} {{noun}} is down, {{verb}} the {{adjective}} {{noun}} so we can {{verb}} the {{abbreviation}} {{noun}}!",
"{{ingverb}} the {{noun}} won't do anything, we need to {{verb}} the {{adjective}} {{abbreviation}} {{noun}}!",
"I'll {{verb}} the {{adjective}} {{abbreviation}} {{noun}}, that should {{noun}} the {{abbreviation}} {{noun}}!"
]);
return faker.helpers.mustache(phrase, data);
};
return self;
};
module['exports'] = Hacker;
\ No newline at end of file
/**
*
* @namespace faker.helpers
*/
var Helpers = function (faker) {
var self = this;
/**
* backword-compatibility
*
* @method faker.helpers.randomize
* @param {array} array
*/
self.randomize = function (array) {
array = array || ["a", "b", "c"];
return faker.random.arrayElement(array);
};
/**
* slugifies string
*
* @method faker.helpers.slugify
* @param {string} string
*/
self.slugify = function (string) {
string = string || "";
return string.replace(/ /g, '-').replace(/[^\w\.\-]+/g, '');
};
/**
* parses string for a symbol and replace it with a random number from 1-10
*
* @method faker.helpers.replaceSymbolWithNumber
* @param {string} string
* @param {string} symbol defaults to `"#"`
*/
self.replaceSymbolWithNumber = function (string, symbol) {
string = string || "";
// default symbol is '#'
if (symbol === undefined) {
symbol = '#';
}
var str = '';
for (var i = 0; i < string.length; i++) {
if (string.charAt(i) == symbol) {
str += faker.random.number(9);
} else {
str += string.charAt(i);
}
}
return str;
};
/**
* parses string for symbols (numbers or letters) and replaces them appropriately
*
* @method faker.helpers.replaceSymbols
* @param {string} string
*/
self.replaceSymbols = function (string) {
string = string || "";
var alpha = ['A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z']
var str = '';
for (var i = 0; i < string.length; i++) {
if (string.charAt(i) == "#") {
str += faker.random.number(9);
} else if (string.charAt(i) == "?") {
str += faker.random.arrayElement(alpha);
} else {
str += string.charAt(i);
}
}
return str;
};
/**
* takes an array and returns it randomized
*
* @method faker.helpers.shuffle
* @param {array} o
*/
self.shuffle = function (o) {
if (typeof o === 'undefined' || o.length === 0) {
return [];
}
o = o || ["a", "b", "c"];
for (var j, x, i = o.length-1; i; j = faker.random.number(i), x = o[--i], o[i] = o[j], o[j] = x);
return o;
};
/**
* mustache
*
* @method faker.helpers.mustache
* @param {string} str
* @param {object} data
*/
self.mustache = function (str, data) {
if (typeof str === 'undefined') {
return '';
}
for(var p in data) {
var re = new RegExp('{{' + p + '}}', 'g')
str = str.replace(re, data[p]);
}
return str;
};
/**
* createCard
*
* @method faker.helpers.createCard
*/
self.createCard = function () {
return {
"name": faker.name.findName(),
"username": faker.internet.userName(),
"email": faker.internet.email(),
"address": {
"streetA": faker.address.streetName(),
"streetB": faker.address.streetAddress(),
"streetC": faker.address.streetAddress(true),
"streetD": faker.address.secondaryAddress(),
"city": faker.address.city(),
"state": faker.address.state(),
"country": faker.address.country(),
"zipcode": faker.address.zipCode(),
"geo": {
"lat": faker.address.latitude(),
"lng": faker.address.longitude()
}
},
"phone": faker.phone.phoneNumber(),
"website": faker.internet.domainName(),
"company": {
"name": faker.company.companyName(),
"catchPhrase": faker.company.catchPhrase(),
"bs": faker.company.bs()
},
"posts": [
{
"words": faker.lorem.words(),
"sentence": faker.lorem.sentence(),
"sentences": faker.lorem.sentences(),
"paragraph": faker.lorem.paragraph()
},
{
"words": faker.lorem.words(),
"sentence": faker.lorem.sentence(),
"sentences": faker.lorem.sentences(),
"paragraph": faker.lorem.paragraph()
},
{
"words": faker.lorem.words(),
"sentence": faker.lorem.sentence(),
"sentences": faker.lorem.sentences(),
"paragraph": faker.lorem.paragraph()
}
],
"accountHistory": [faker.helpers.createTransaction(), faker.helpers.createTransaction(), faker.helpers.createTransaction()]
};
};
/**
* contextualCard
*
* @method faker.helpers.contextualCard
*/
self.contextualCard = function () {
var name = faker.name.firstName(),
userName = faker.internet.userName(name);
return {
"name": name,
"username": userName,
"avatar": faker.internet.avatar(),
"email": faker.internet.email(userName),
"dob": faker.date.past(50, new Date("Sat Sep 20 1992 21:35:02 GMT+0200 (CEST)")),
"phone": faker.phone.phoneNumber(),
"address": {
"street": faker.address.streetName(true),
"suite": faker.address.secondaryAddress(),
"city": faker.address.city(),
"zipcode": faker.address.zipCode(),
"geo": {
"lat": faker.address.latitude(),
"lng": faker.address.longitude()
}
},
"website": faker.internet.domainName(),
"company": {
"name": faker.company.companyName(),
"catchPhrase": faker.company.catchPhrase(),
"bs": faker.company.bs()
}
};
};
/**
* userCard
*
* @method faker.helpers.userCard
*/
self.userCard = function () {
return {
"name": faker.name.findName(),
"username": faker.internet.userName(),
"email": faker.internet.email(),
"address": {
"street": faker.address.streetName(true),
"suite": faker.address.secondaryAddress(),
"city": faker.address.city(),
"zipcode": faker.address.zipCode(),
"geo": {
"lat": faker.address.latitude(),
"lng": faker.address.longitude()
}
},
"phone": faker.phone.phoneNumber(),
"website": faker.internet.domainName(),
"company": {
"name": faker.company.companyName(),
"catchPhrase": faker.company.catchPhrase(),
"bs": faker.company.bs()
}
};
};
/**
* createTransaction
*
* @method faker.helpers.createTransaction
*/
self.createTransaction = function(){
return {
"amount" : faker.finance.amount(),
"date" : new Date(2012, 1, 2), //TODO: add a ranged date method
"business": faker.company.companyName(),
"name": [faker.finance.accountName(), faker.finance.mask()].join(' '),
"type" : self.randomize(faker.definitions.finance.transaction_type),
"account" : faker.finance.account()
};
};
return self;
};
/*
String.prototype.capitalize = function () { //v1.0
return this.replace(/\w+/g, function (a) {
return a.charAt(0).toUpperCase() + a.substr(1).toLowerCase();
});
};
*/
module['exports'] = Helpers;
/**
*
* @namespace faker.image
*/
var Image = function (faker) {
var self = this;
/**
* image
*
* @param {number} width
* @param {number} height
* @param {boolean} randomize
* @method faker.image.image
*/
self.image = function (width, height, randomize) {
var categories = ["abstract", "animals", "business", "cats", "city", "food", "nightlife", "fashion", "people", "nature", "sports", "technics", "transport"];
return self[faker.random.arrayElement(categories)](width, height, randomize);
};
/**
* avatar
*
* @method faker.image.avatar
*/
self.avatar = function () {
return faker.internet.avatar();
};
/**
* imageUrl
*
* @param {number} width
* @param {number} height
* @param {string} category
* @param {boolean} randomize
* @method faker.image.imageUrl
*/
self.imageUrl = function (width, height, category, randomize, https) {
var width = width || 640;
var height = height || 480;
var protocol = 'http://';
if (typeof https !== 'undefined' && https === true) {
protocol = 'https://';
}
var url = protocol + 'lorempixel.com/' + width + '/' + height;
if (typeof category !== 'undefined') {
url += '/' + category;
}
if (randomize) {
url += '?' + faker.random.number()
}
return url;
};
/**
* abstract
*
* @param {number} width
* @param {number} height
* @param {boolean} randomize
* @method faker.image.abstract
*/
self.abstract = function (width, height, randomize) {
return faker.image.imageUrl(width, height, 'abstract', randomize);
};
/**
* animals
*
* @param {number} width
* @param {number} height
* @param {boolean} randomize
* @method faker.image.animals
*/
self.animals = function (width, height, randomize) {
return faker.image.imageUrl(width, height, 'animals', randomize);
};
/**
* business
*
* @param {number} width
* @param {number} height
* @param {boolean} randomize
* @method faker.image.business
*/
self.business = function (width, height, randomize) {
return faker.image.imageUrl(width, height, 'business', randomize);
};
/**
* cats
*
* @param {number} width
* @param {number} height
* @param {boolean} randomize
* @method faker.image.cats
*/
self.cats = function (width, height, randomize) {
return faker.image.imageUrl(width, height, 'cats', randomize);
};
/**
* city
*
* @param {number} width
* @param {number} height
* @param {boolean} randomize
* @method faker.image.city
*/
self.city = function (width, height, randomize) {
return faker.image.imageUrl(width, height, 'city', randomize);
};
/**
* food
*
* @param {number} width
* @param {number} height
* @param {boolean} randomize
* @method faker.image.food
*/
self.food = function (width, height, randomize) {
return faker.image.imageUrl(width, height, 'food', randomize);
};
/**
* nightlife
*
* @param {number} width
* @param {number} height
* @param {boolean} randomize
* @method faker.image.nightlife
*/
self.nightlife = function (width, height, randomize) {
return faker.image.imageUrl(width, height, 'nightlife', randomize);
};
/**
* fashion
*
* @param {number} width
* @param {number} height
* @param {boolean} randomize
* @method faker.image.fashion
*/
self.fashion = function (width, height, randomize) {
return faker.image.imageUrl(width, height, 'fashion', randomize);
};
/**
* people
*
* @param {number} width
* @param {number} height
* @param {boolean} randomize
* @method faker.image.people
*/
self.people = function (width, height, randomize) {
return faker.image.imageUrl(width, height, 'people', randomize);
};
/**
* nature
*
* @param {number} width
* @param {number} height
* @param {boolean} randomize
* @method faker.image.nature
*/
self.nature = function (width, height, randomize) {
return faker.image.imageUrl(width, height, 'nature', randomize);
};
/**
* sports
*
* @param {number} width
* @param {number} height
* @param {boolean} randomize
* @method faker.image.sports
*/
self.sports = function (width, height, randomize) {
return faker.image.imageUrl(width, height, 'sports', randomize);
};
/**
* technics
*
* @param {number} width
* @param {number} height
* @param {boolean} randomize
* @method faker.image.technics
*/
self.technics = function (width, height, randomize) {
return faker.image.imageUrl(width, height, 'technics', randomize);
};
/**
* transport
*
* @param {number} width
* @param {number} height
* @param {boolean} randomize
* @method faker.image.transport
*/
self.transport = function (width, height, randomize) {
return faker.image.imageUrl(width, height, 'transport', randomize);
};
/**
* dataUri
*
* @param {number} width
* @param {number} height
* @method faker.image.dataurl
*/
self.dataUri = function (width, height) {
var rawPrefix = 'data:image/svg+xml;charset=UTF-8,';
var svgString = '<svg xmlns="http://www.w3.org/2000/svg" version="1.1" baseProfile="full" width="' + width + '" height="' + height + '"> <rect width="100%" height="100%" fill="grey"/> <text x="0" y="20" font-size="20" text-anchor="start" fill="white">' + width + 'x' + height + '</text> </svg>';
return rawPrefix + encodeURIComponent(svgString);
};
}
module["exports"] = Image;
\ No newline at end of file
/*
this index.js file is used for including the faker library as a CommonJS module, instead of a bundle
you can include the faker library into your existing node.js application by requiring the entire /faker directory
var faker = require(./faker);
var randomName = faker.name.findName();
you can also simply include the "faker.js" file which is the auto-generated bundled version of the faker library
var faker = require(./customAppPath/faker);
var randomName = faker.name.findName();
if you plan on modifying the faker library you should be performing your changes in the /lib/ directory
*/
/**
*
* @namespace faker
*/
function Faker (opts) {
var self = this;
opts = opts || {};
// assign options
var locales = self.locales || opts.locales || {};
var locale = self.locale || opts.locale || "en";
var localeFallback = self.localeFallback || opts.localeFallback || "en";
self.locales = locales;
self.locale = locale;
self.localeFallback = localeFallback;
self.definitions = {};
function bindAll(obj) {
Object.keys(obj).forEach(function(meth) {
if (typeof obj[meth] === 'function') {
obj[meth] = obj[meth].bind(obj);
}
});
return obj;
}
var Fake = require('./fake');
self.fake = new Fake(self).fake;
var Random = require('./random');
self.random = bindAll(new Random(self));
var Helpers = require('./helpers');
self.helpers = new Helpers(self);
var Name = require('./name');
self.name = bindAll(new Name(self));
var Address = require('./address');
self.address = bindAll(new Address(self));
var Company = require('./company');
self.company = bindAll(new Company(self));
var Finance = require('./finance');
self.finance = bindAll(new Finance(self));
var Image = require('./image');
self.image = bindAll(new Image(self));
var Lorem = require('./lorem');
self.lorem = bindAll(new Lorem(self));
var Hacker = require('./hacker');
self.hacker = bindAll(new Hacker(self));
var Internet = require('./internet');
self.internet = bindAll(new Internet(self));
var Database = require('./database');
self.database = bindAll(new Database(self));
var Phone = require('./phone_number');
self.phone = bindAll(new Phone(self));
var _Date = require('./date');
self.date = bindAll(new _Date(self));
var Commerce = require('./commerce');
self.commerce = bindAll(new Commerce(self));
var System = require('./system');
self.system = bindAll(new System(self));
var _definitions = {
"name": ["first_name", "last_name", "prefix", "suffix", "title", "male_first_name", "female_first_name", "male_middle_name", "female_middle_name", "male_last_name", "female_last_name"],
"address": ["city_prefix", "city_suffix", "street_suffix", "county", "country", "country_code", "state", "state_abbr", "street_prefix", "postcode"],
"company": ["adjective", "noun", "descriptor", "bs_adjective", "bs_noun", "bs_verb", "suffix"],
"lorem": ["words"],
"hacker": ["abbreviation", "adjective", "noun", "verb", "ingverb"],
"phone_number": ["formats"],
"finance": ["account_type", "transaction_type", "currency", "iban"],
"internet": ["avatar_uri", "domain_suffix", "free_email", "example_email", "password"],
"commerce": ["color", "department", "product_name", "price", "categories"],
"database": ["collation", "column", "engine", "type"],
"system": ["mimeTypes"],
"date": ["month", "weekday"],
"title": "",
"separator": ""
};
// Create a Getter for all definitions.foo.bar properties
Object.keys(_definitions).forEach(function(d){
if (typeof self.definitions[d] === "undefined") {
self.definitions[d] = {};
}
if (typeof _definitions[d] === "string") {
self.definitions[d] = _definitions[d];
return;
}
_definitions[d].forEach(function(p){
Object.defineProperty(self.definitions[d], p, {
get: function () {
if (typeof self.locales[self.locale][d] === "undefined" || typeof self.locales[self.locale][d][p] === "undefined") {
// certain localization sets contain less data then others.
// in the case of a missing definition, use the default localeFallback to substitute the missing set data
// throw new Error('unknown property ' + d + p)
return self.locales[localeFallback][d][p];
} else {
// return localized data
return self.locales[self.locale][d][p];
}
}
});
});
});
};
Faker.prototype.seed = function(value) {
var Random = require('./random');
this.seedValue = value;
this.random = new Random(this, this.seedValue);
}
module['exports'] = Faker;
exports['az'] = require('./locales/az');
exports['cz'] = require('./locales/cz');
exports['de'] = require('./locales/de');
exports['de_AT'] = require('./locales/de_AT');
exports['de_CH'] = require('./locales/de_CH');
exports['en'] = require('./locales/en');
exports['en_AU'] = require('./locales/en_AU');
exports['en_BORK'] = require('./locales/en_BORK');
exports['en_CA'] = require('./locales/en_CA');
exports['en_GB'] = require('./locales/en_GB');
exports['en_IE'] = require('./locales/en_IE');
exports['en_IND'] = require('./locales/en_IND');
exports['en_US'] = require('./locales/en_US');
exports['en_au_ocker'] = require('./locales/en_au_ocker');
exports['es'] = require('./locales/es');
exports['es_MX'] = require('./locales/es_MX');
exports['fa'] = require('./locales/fa');
exports['fr'] = require('./locales/fr');
exports['fr_CA'] = require('./locales/fr_CA');
exports['ge'] = require('./locales/ge');
exports['id_ID'] = require('./locales/id_ID');
exports['it'] = require('./locales/it');
exports['ja'] = require('./locales/ja');
exports['ko'] = require('./locales/ko');
exports['nb_NO'] = require('./locales/nb_NO');
exports['nep'] = require('./locales/nep');
exports['nl'] = require('./locales/nl');
exports['pl'] = require('./locales/pl');
exports['pt_BR'] = require('./locales/pt_BR');
exports['ru'] = require('./locales/ru');
exports['sk'] = require('./locales/sk');
exports['sv'] = require('./locales/sv');
exports['tr'] = require('./locales/tr');
exports['uk'] = require('./locales/uk');
exports['vi'] = require('./locales/vi');
exports['zh_CN'] = require('./locales/zh_CN');
exports['zh_TW'] = require('./locales/zh_TW');
module["exports"] = [
"Ağcabədi",
"Ağdam",
"Ağdaş",
"Ağdərə",
"Ağstafa",
"Ağsu",
"Astara",
"Bakı",
"Balakən",
"Beyləqan",
"Bərdə",
"Biləsuvar",
"Cəbrayıl",
"Cəlilabad",
"Culfa",
"Daşkəsən",
"Dəliməmmədli",
"Füzuli",
"Gədəbəy",
"Gəncə",
"Goranboy",
"Göyçay",
"Göygöl",
"Göytəpə",
"Hacıqabul",
"Horadiz",
"Xaçmaz",
"Xankəndi",
"Xocalı",
"Xocavənd",
"Xırdalan",
"Xızı",
"Xudat",
"İmişli",
"İsmayıllı",
"Kəlbəcər",
"Kürdəmir",
"Qax",
"Qazax",
"Qəbələ",
"Qobustan",
"Qovlar",
"Quba",
"Qubadlı",
"Qusar",
"Laçın",
"Lerik",
"Lənkəran",
"Liman",
"Masallı",
"Mingəçevir",
"Naftalan",
"Naxçıvan (şəhər)",
"Neftçala",
"Oğuz",
"Ordubad",
"Saatlı",
"Sabirabad",
"Salyan",
"Samux",
"Siyəzən",
"Sumqayıt",
"Şabran",
"Şahbuz",
"Şamaxı",
"Şəki",
"Şəmkir",
"Şərur",
"Şirvan",
"Şuşa",
"Tərtər",
"Tovuz",
"Ucar",
"Yardımlı",
"Yevlax",
"Zaqatala",
"Zəngilan",
"Zərdab"
];
module["exports"] = [
"Akrotiri və Dekeliya",
"Aland adaları",
"Albaniya",
"Almaniya",
"Amerika Samoası",
"Andorra",
"Angilya",
"Anqola",
"Antiqua və Barbuda",
"Argentina",
"Aruba",
"Avstraliya",
"Avstriya",
"Azərbaycan",
"Baham adaları",
"Banqladeş",
"Barbados",
"Belçika",
"Beliz",
"Belarus",
"Benin",
"Bermud adaları",
"BƏƏ",
"ABŞ",
"Boliviya",
"Bolqarıstan",
"Bosniya və Herseqovina",
"Botsvana",
"Böyük Britaniya",
"Braziliya",
"Bruney",
"Burkina-Faso",
"Burundi",
"Butan",
"Bəhreyn",
"Cersi",
"Cəbəli-Tariq",
"CAR",
"Cənubi Sudan",
"Cənubi Koreya",
"Cibuti",
"Çad",
"Çexiya",
"Monteneqro",
"Çili",
"ÇXR",
"Danimarka",
"Dominika",
"Dominikan Respublikası",
"Efiopiya",
"Ekvador",
"Ekvatorial Qvineya",
"Eritreya",
"Ermənistan",
"Estoniya",
"Əfqanıstan",
"Əlcəzair",
"Farer adaları",
"Fələstin Dövləti",
"Fici",
"Kot-d’İvuar",
"Filippin",
"Finlandiya",
"Folklend adaları",
"Fransa",
"Fransa Polineziyası",
"Gernsi",
"Gürcüstan",
"Haiti",
"Hindistan",
"Honduras",
"Honkonq",
"Xorvatiya",
"İndoneziya",
"İordaniya",
"İraq",
"İran",
"İrlandiya",
"İslandiya",
"İspaniya",
"İsrail",
"İsveç",
"İsveçrə",
"İtaliya",
"Kabo-Verde",
"Kamboca",
"Kamerun",
"Kanada",
"Kayman adaları",
"Keniya",
"Kipr",
"Kiribati",
"Kokos adaları",
"Kolumbiya",
"Komor adaları",
"Konqo Respublikası",
"KDR",
"Kosovo",
"Kosta-Rika",
"Kuba",
"Kuk adaları",
"Küveyt",
"Qabon",
"Qambiya",
"Qana",
"Qətər",
"Qayana",
"Qazaxıstan",
"Qərbi Sahara",
"Qırğızıstan",
"Qrenada",
"Qrenlandiya",
"Quam",
"Qvatemala",
"Qvineya",
"Qvineya-Bisau",
"Laos",
"Latviya",
"Lesoto",
"Liberiya",
"Litva",
"Livan",
"Liviya",
"Lixtenşteyn",
"Lüksemburq",
"Macarıstan",
"Madaqaskar",
"Makao",
"Makedoniya",
"Malavi",
"Malayziya",
"Maldiv adaları",
"Mali",
"Malta",
"Marşall adaları",
"Mavriki",
"Mavritaniya",
"Mayotta",
"Meksika",
"Men adası",
"Mərakeş",
"MAR",
"Mikroneziya",
"Milad adası",
"Misir",
"Myanma",
"Moldova",
"Monako",
"Monqolustan",
"Montserrat",
"Mozambik",
"Müqəddəs Yelena, Askenson və Tristan-da-Kunya adaları",
"Namibiya",
"Nauru",
"Nepal",
"Niderland",
"Niderland Antil adaları",
"Niger",
"Nigeriya",
"Nikaraqua",
"Niue",
"Norfolk adası",
"Norveç",
"Oman",
"Özbəkistan",
"Pakistan",
"Palau",
"Panama",
"Papua-Yeni Qvineya",
"Paraqvay",
"Peru",
"Pitkern adaları",
"Polşa",
"Portuqaliya",
"Prednestroviya",
"Puerto-Riko",
"Ruanda",
"Rumıniya",
"Rusiya",
"Salvador",
"Samoa",
"San-Marino",
"San-Tome və Prinsipi",
"Seneqal",
"Sen-Bartelemi",
"Sent-Kits və Nevis",
"Sent-Lüsiya",
"Sen-Marten",
"Sen-Pyer və Mikelon",
"Sent-Vinsent və Qrenadina",
"Serbiya",
"Seyşel adaları",
"Səudiyyə Ərəbistanı",
"Sinqapur",
"Slovakiya",
"Sloveniya",
"Solomon adaları",
"Somali",
"Somalilend",
"Sudan",
"Surinam",
"Suriya",
"Svazilend",
"Syerra-Leone",
"Şərqi Timor",
"Şimali Marian adaları",
"Şpisbergen və Yan-Mayen",
"Şri-Lanka",
"Tacikistan",
"Tanzaniya",
"Tailand",
"Çin Respublikası",
"Törks və Kaykos adaları",
"Tokelau",
"Tonqa",
"Toqo",
"Trinidad və Tobaqo",
"Tunis",
"Tuvalu",
"Türkiyə",
"Türkmənistan",
"Ukrayna",
"Uollis və Futuna",
"Uqanda",
"Uruqvay",
"Vanuatu",
"Vatikan",
"Venesuela",
"Amerika Virgin adaları",
"Britaniya Virgin adaları",
"Vyetnam",
"Yamayka",
"Yaponiya",
"Yeni Kaledoniya",
"Yeni Zelandiya",
"Yəmən",
"Yunanıstan",
"Zambiya",
"Zimbabve"
];
var address = {};
module['exports'] = address;
address.country = require("./country");
address.building_number = require("./building_number");
address.street_suffix = require("./street_suffix");
address.secondary_address = require("./secondary_address");
address.postcode = require("./postcode");
address.state = require("./state");
address.street_title = require("./street_title");
address.city_name = require("./city_name");
address.city = require("./city");
address.street_name = require("./street_name");
address.street_address = require("./street_address");
address.default_country = require("./default_country");
module["exports"] = [
"#{street_suffix} #{Address.street_title}",
"#{Address.street_title} #{street_suffix}"
];
module["exports"] = [
"küç.",
"küçəsi",
"prospekti",
"pr.",
"sahəsi",
"sh."
];
module["exports"] = [
"Abbas Fətullayev",
"Abbas Mirzə Şərifzadə",
"Abbas Səhhət",
"Abdulla Şaiq",
"Afiyəddin Cəlilov",
"Axundov",
"Ağa Nemətulla",
"Ağadadaş Qurbanov",
"Akademik Həsən Əliyev",
"Akademik Lətif İmanov",
"Alı Mustafayev",
"Almas İldırım",
"Asəf Zeynallı",
"Asif Əsədullayev",
"Aşıq Alı",
"Aşıq Ələsgər",
"Azadlıq prospekti",
"Bakıxanov",
"Balababa Məcidov",
"Balaəmi Dadaşov",
"Behbud Şaxtantinski",
"Bəkir Çobanzadə",
"Bəsti Bağırova",
"Bəşir Səfəroğlu",
"Böyük Qala",
"Cabir Əliyev",
"Camal Hacıəliyev",
"Cavadxan",
"Cavanşir",
"Ceyhun Səlimov",
"Ceyhunbəy Hacıbəyli",
"Cəbiyev",
"Cəfər Xəndan",
"Cəfər Cabbarlı",
"Cəlal Qurbanov",
"Cəlil Məmmədquluzadə",
"Çingiz Mustafayev",
"Çobanzadə",
"Dadaş Bünyadzadə",
"Dağlı Yunus",
"Dilarə Əliyeva",
"Elçin Əzimov",
"Eldar və Abdulla Əlibəyovlar",
"Elxan Həsənov",
"Elşən Mehdiyev",
"Elşən Süleymanov",
"Etibar Bəkirov",
"Əbdüləzəl Dəmirçizadə",
"Əbdülhəsən Anaplı",
"Əbdülkərim Əlizadə",
"Əhməd bəy Ağaoğlu",
"Əhməd Cavad",
"Əhməd Cəmil",
"Əhməd Mehbalıyev",
"Əhməd Rəcəbli",
"Əjdər Xanbabayev",
"Əkrəm Cəfərov",
"Ələsgər Qayıbov",
"Əliağa Vahid",
"Əli Bəy Hüseynzadə",
"Əlimərdan bəy Topçubaşov",
"Əliyar Əliyev",
"Əlövsət Abdulrəhimov",
"Əlövsət Quliyev",
"Əmir Bağırov",
"Əsəd Əhmədov",
"Əşrəf Yunusov",
"Əzim Əzimzadə",
"Əziz Əliyev",
"Heybət Heybətov",
"Həqiqət Rzayeva",
"Həmid Araslı",
"Hənifə Ələsgərova",
"Hərbçilər",
"Həsənoğu",
"Həsən Seyidbəyli",
"Hətəm Allahverdiyev",
"Həzi Aslanov",
"Hüsü Hacıyev",
"Hüseynqulu Sarabski",
"Fətəli xan Xoyski",
"Fəzail Bayramov",
"Fikrət Əmirov",
"Fuad İbrahimbəyov",
"Fuad Yusifov",
"General Əliağa Şıxlinski",
"Gülayə Qədirbəyova",
"Gənclik",
"Xaqani",
"Xan Şuşinski",
"Xanlar",
"Xudu Məmmədov",
"İbrahimpaşa Dadaşov",
"İdris Süleymanov",
"İlqar Abbasov",
"İlqar İsmayılov",
"İmran Qasımov",
"İnqilab İsmayılov",
"İsfəndiyar Zülalov",
"İslam Abışov",
"İslam Səfərli",
"İsmayıl bəy Qutqaşınlı",
"İsmayıl Mirzəgülov",
"İstiqlaliyyət",
"28 May",
"İsgəndərov",
"İvan Turgenev",
"İzmir",
"İzzət Həmidov",
"İzzət Orucova",
"Kamal Rəhimov",
"Kazım Kazımzadə",
"Kazımağa Kərimov",
"Kərəm İsmayılov",
"Kiçik Qala",
"Koroğlu Rəhimov",
"Qaçaq Nəbi",
"Qarabağ",
"Qədirbəyov",
"Qəzənfər Musabəyov",
"Qəzənfər Vəliyev",
"Leyla Məmmədbəyova",
"Mahmud İbrahimov",
"Malik Məmmədov",
"Mehdi Abbasov",
"Mehdi Mehdizadə",
"Məhəmməd Əmin Rəsulzadə",
"Məhəmməd Hadi",
"Məhəmməd Xiyabani",
"Məhəmməd ibn Hinduşah Naxçıvani",
"Məhsəti Gəncəvi",
"Məmmədyarov",
"Mərdanov qardaşları",
"Mətləb Ağayev",
"Məşədi Hilal",
"Məzahir Rüstəmov",
"Mikayıl Müşviq",
"Mingəçevir",
"Mirəli Qaşqay",
"Mirəli Seyidov",
"Mirzağa Əliyev",
"Mirzə İbrahimov",
"Mirzə Mənsur",
"Mirzə Mustafayev",
"Murtuza Muxtarov",
"Mustafa Topçubaşov",
"Müqtədir Aydınbəyov",
"Müslüm Maqomayev",
"Müzəffər Həsənov",
"Nabat Aşurbəyova",
"Naxçıvani",
"Naximov",
"Nazim İsmaylov",
"Neapol",
"Neftçi Qurban Abbasov",
"Neftçilər prospekti",
"Nəcəfbəy Vəzirov",
"Nəcəfqulu Rəfiyev",
"Nəriman Nərimanov",
"Nəsirəddin Tusi",
"Nigar Rəfibəyli",
"Niyazi",
"Nizami",
"Nizami Abdullayev",
"Nobel prospekti",
"Novruz",
"Novruzov qardaşları",
"Oqtay Vəliyev",
"Parlament",
"Puşkin",
"Rafiq Ağayev",
"Ramiz Qəmbərov",
"Rəşid Behbudov",
"Rəşid Məcidov",
"Ruhulla Axundov",
"Ruslan Allahverdiyev",
"Rüstəm Rüstəmov",
"Tahir Bağırov",
"Tarzan Hacı Məmmədov",
"Tbilisi prospekti",
"Təbriz (Bakı)",
"Təbriz Xəlilbəyli",
"Tofiq Məmmədov",
"Tolstoy",
"Sabit Orucov",
"Sabit Rəhman",
"Sahib Hümmətov",
"Salatın Əsgərova",
"Sarayevo",
"Seyid Əzim Şirvani",
"Seyid Şuşinski",
"Seyidov",
"Səməd bəy Mehmandarov",
"Səməd Vurğun",
"Səttar Bəhlulzadə",
"Sona xanım Vəlixanlı",
"Sübhi Salayev",
"Süleyman Əhmədov",
"Süleyman Rəhimov",
"Süleyman Rüstəm",
"Süleyman Sani Axundov",
"Süleyman Vəzirov",
"Şahin Səmədov",
"Şamil Əzizbəyov",
"Şamil Kamilov",
"Şeyx Şamil",
"Şəfayət Mehdiyev",
"Şəmsi Bədəlbəyli",
"Şirin Mirzəyev",
"Şıxəli Qurbanov",
"Şövkət Ələkbərova",
"Ülvi Bünyadzadə",
"Üzeyir Hacıbəyov",
"Vasif Əliyev",
"Vəli Məmmədov",
"Vladislav Plotnikov",
"Vüqar Quliyev",
"Vunq Tau",
"Yaqub Əliyev",
"Yaşar Abdullayev",
"Yaşar Əliyev",
"Yavər Əliyev",
"Yesenin",
"Yəhya Hüseynov",
"Yılmaz Axundzadə",
"Yüsif Eyvazov",
"Yusif Qasımov",
"Yusif Məmmədəliyev",
"Yusif Səfərov",
"Yusif Vəzir Çəmənzəminli",
"Zahid Əliyev",
"Zahid Xəlilov",
"Zaur Kərimov",
"Zavod",
"Zərgərpalan"
];
module["exports"] = [
"ala",
"açıq bənövşəyi",
"ağ",
"mavi",
"boz",
"bənövşəyi",
"göy rəng",
"gümüşü",
"kardinal",
"narıncı",
"qara",
"qırmızı",
"qəhvəyi",
"tünd göy",
"tünd qırmızı",
"xlorofil",
"yaşıl",
"çəhrayı"
];
module["exports"] = [
"Kitablar",
"Filmlər",
"musiqi",
"oyunlar",
"Elektronika",
"Kompyuterlər",
"Ev",
"садинструмент",
"Səhiyyə",
"gözəllik",
"Oyuncaqlar",
"uşaq üçün",
"Geyim",
"Ayyaqqabı",
"bəzək",
"İdman",
"turizm",
"Avtomobil",
];
var commerce = {};
module['exports'] = commerce;
commerce.color = require("./color");
commerce.department = require("./department");
commerce.product_name = require("./product_name");
module["exports"] = {
"adjective": [
"Balaca",
"Ergonomik",
"Kobud",
"İntellektual",
"Möhtəşəm",
"İnanılmaz",
"Fantastik",
"Əlverişli",
"Parlaq",
"Mükəmməl"
],
"material": [
"Polad",
"Ağac",
"Beton",
"Plastik",
"Pambıq",
"Qranit",
"Rezin"
],
"product": [
"Stul",
"Avtomobil",
"Kompyuter",
"Beret",
"Kulon",
"Stol",
"Sviter",
"Kəmər",
]
};
var company = {};
module['exports'] = company;
company.prefix = require("./prefix");
company.suffix = require("./suffix");
company.name = require("./name");
module["exports"] = [
"#{prefix} #{Name.female_first_name}",
"#{prefix} #{Name.male_first_name}",
"#{prefix} #{Name.male_last_name}",
"#{prefix} #{suffix}#{suffix}",
"#{prefix} #{suffix}#{suffix}#{suffix}",
"#{prefix} #{Address.city_name}#{suffix}",
"#{prefix} #{Address.city_name}#{suffix}#{suffix}",
"#{prefix} #{Address.city_name}#{suffix}#{suffix}#{suffix}"
];
var date = {};
module["exports"] = date;
date.month = require("./month");
date.weekday = require("./weekday");
// source: http://unicode.org/cldr/trac/browser/tags/release-27/common/main/ru.xml#L1734
module["exports"] = {
wide: [
"yanvar",
"fevral",
"mart",
"aprel",
"may",
"iyun",
"iyul",
"avqust",
"sentyabr",
"oktyabr",
"noyabr",
"dekabr"
],
wide_context: [
"января",
"февраля",
"марта",
"апреля",
"мая",
"июня",
"июля",
"августа",
"сентября",
"октября",
"ноября",
"декабря"
],
abbr: [
"янв.",
"февр.",
"март",
"апр.",
"май",
"июнь",
"июль",
"авг.",
"сент.",
"окт.",
"нояб.",
"дек."
],
abbr_context: [
"янв.",
"февр.",
"марта",
"апр.",
"мая",
"июня",
"июля",
"авг.",
"сент.",
"окт.",
"нояб.",
"дек."
]
};
// source: http://unicode.org/cldr/trac/browser/tags/release-27/common/main/ru.xml#L1825
module["exports"] = {
wide: [
"Bazar",
"Bazar ertəsi",
"Çərşənbə axşamı",
"Çərşənbə",
"Cümə axşamı",
"Cümə",
"Şənbə"
],
wide_context: [
"воскресенье",
"понедельник",
"вторник",
"среда",
"четверг",
"пятница",
"суббота"
],
abbr: [
"Ba",
"BE",
"ÇA",
"Çə",
"CA",
"Cü",
"Şə"
],
abbr_context: [
"вс",
"пн",
"вт",
"ср",
"чт",
"пт",
"сб"
]
};
var az = {};
module['exports'] = az;
az.title = "Azerbaijani";
az.separator = " və ";
az.address = require("./address");
az.internet = require("./internet");
az.name = require("./name");
az.phone_number = require("./phone_number");
az.commerce = require("./commerce");
az.company = require("./company");
az.date = require("./date");
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment