aboutsummaryrefslogtreecommitdiff
path: root/examples/node
diff options
context:
space:
mode:
authorMarak <[email protected]>2015-07-08 15:47:55 -0700
committerMarak <[email protected]>2015-07-08 15:47:55 -0700
commit85ade36275c9f8394ecd0e44fc0f400ffccc5696 (patch)
treef5ccc47dcb66180f6592f683273701ad9986d9b7 /examples/node
parentb0765aea125e9d89991d382e46c758860dc866aa (diff)
downloadfaker-85ade36275c9f8394ecd0e44fc0f400ffccc5696.tar.xz
faker-85ade36275c9f8394ecd0e44fc0f400ffccc5696.zip
[dist] Update examples
Diffstat (limited to 'examples/node')
-rw-r--r--examples/node/bigDataSet.json1
-rw-r--r--examples/node/dataSet.json1
-rw-r--r--examples/node/generateSet.js19
-rw-r--r--examples/node/generators.js13
-rwxr-xr-xexamples/node/minimal-usage.js13
-rw-r--r--examples/node/singleLocale.js7
6 files changed, 54 insertions, 0 deletions
diff --git a/examples/node/bigDataSet.json b/examples/node/bigDataSet.json
new file mode 100644
index 00000000..5e4c9074
--- /dev/null
+++ b/examples/node/bigDataSet.json
@@ -0,0 +1 @@
+[{"name":"Cecelia Hagenes","username":"Jayne79","email":"[email protected]","address":{"street":"Farrell Underpass","suite":"Suite 020","city":"West Hester","zipcode":"66522","geo":{"lat":"69.9018","lng":"-141.7985"}},"phone":"500-543-0598","website":"berneice.name","company":{"name":"Mosciski, Gerlach and Kunde","catchPhrase":"Progressive context-sensitive definition","bs":"cross-platform deploy ROI"}},{"name":"Berta Doyle Mrs.","username":"Mozelle.Johnson74","email":"[email protected]","address":{"street":"Dare Courts","suite":"Apt. 768","city":"Alexis furt","zipcode":"89675","geo":{"lat":"26.5209","lng":"-122.1554"}},"phone":"1-046-042-3914 x44325","website":"cloyd.net","company":{"name":"Daniel - Orn","catchPhrase":"Object-based client-driven artificial intelligence","bs":"ubiquitous harness technologies"}},{"name":"Aubree Gerlach","username":"Vito62","email":"[email protected]","address":{"street":"Crawford Points","suite":"Suite 736","city":"Port Davon","zipcode":"58173-0932","geo":{"lat":"-3.3617","lng":"143.2427"}},"phone":"096-611-9086","website":"javonte.org","company":{"name":"Shanahan Inc","catchPhrase":"Reactive bifurcated circuit","bs":"value-added harness technologies"}},{"name":"Kendall Kautzer","username":"Yvette39","email":"[email protected]","address":{"street":"Satterfield Haven","suite":"Apt. 510","city":"Payton shire","zipcode":"82901-5932","geo":{"lat":"-65.8622","lng":"-97.7873"}},"phone":"1-220-070-6242","website":"dario.org","company":{"name":"Paucek, Lebsack and Lind","catchPhrase":"Exclusive incremental parallelism","bs":"global generate vortals"}},{"name":"Mara Gerhold","username":"Alyce.Homenick62","email":"[email protected]","address":{"street":"Jerod Ranch","suite":"Apt. 401","city":"Dexter shire","zipcode":"88172","geo":{"lat":"-87.8840","lng":"-47.1895"}},"phone":"(049) 042-3261 x158","website":"leora.info","company":{"name":"Feil Inc","catchPhrase":"Digitized reciprocal database","bs":"global mesh e-markets"}},{"name":"Burnice Farrell","username":"Toni12","email":"[email protected]","address":{"street":"Marquise Meadow","suite":"Apt. 376","city":"Earl mouth","zipcode":"39544-7004","geo":{"lat":"-71.6252","lng":"32.1818"}},"phone":"992.296.5484","website":"cecilia.com","company":{"name":"Abbott - Jerde","catchPhrase":"Fully-configurable empowering policy","bs":"revolutionary implement functionalities"}},{"name":"Kevon Kshlerin","username":"Janet68","email":"[email protected]","address":{"street":"Smith Islands","suite":"Apt. 029","city":"Rice port","zipcode":"39827-1860","geo":{"lat":"59.1139","lng":"77.8133"}},"phone":"977.967.1690 x76901","website":"pauline.com","company":{"name":"Schuppe - Daniel","catchPhrase":"Reverse-engineered dedicated website","bs":"synergistic seize experiences"}},{"name":"Benny Carter","username":"Mariano49","email":"[email protected]","address":{"street":"Orlo Loaf","suite":"Suite 480","city":"Jeffry shire","zipcode":"85516","geo":{"lat":"-55.3198","lng":"-91.6933"}},"phone":"1-197-020-6607","website":"jairo.name","company":{"name":"Mills, Little and Harber","catchPhrase":"Inverse disintermediate standardization","bs":"collaborative seize web services"}},{"name":"Xzavier Towne","username":"Vernon_White20","email":"[email protected]","address":{"street":"Aylin Corners","suite":"Apt. 195","city":"Kshlerin chester","zipcode":"52688-2462","geo":{"lat":"79.3518","lng":"-177.3099"}},"phone":"1-150-221-4874 x114","website":"edythe.net","company":{"name":"Reynolds - Upton","catchPhrase":"Organic zero administration architecture","bs":"next-generation maximize e-markets"}},{"name":"Jamil Hagenes","username":"Jarret_Franecki","email":"[email protected]","address":{"street":"Abbie Roads","suite":"Apt. 598","city":"West Jerome","zipcode":"73008-7304","geo":{"lat":"-11.1591","lng":"-78.7954"}},"phone":"106.637.5426 x540","website":"deontae.biz","company":{"name":"Johns, D'Amore and Pfeffer","catchPhrase":"Horizontal grid-enabled groupware","bs":"visionary repurpose paradigms"}},{"name":"Mazie Kuhic","username":"Maymie.Yundt28","email":"[email protected]","address":{"street":"Kohler Burg","suite":"Suite 786","city":"West Rosalinda","zipcode":"76261-8327","geo":{"lat":"42.8255","lng":"47.7711"}},"phone":"952-222-0599","website":"clifton.com","company":{"name":"Champlin, Keebler and Stark","catchPhrase":"Synergistic systemic Graphic Interface","bs":"compelling deliver relationships"}},{"name":"Nicholaus Zieme","username":"Emerald.Reinger3","email":"[email protected]","address":{"street":"Lockman Wells","suite":"Apt. 940","city":"Bogan chester","zipcode":"28033-3337","geo":{"lat":"8.9736","lng":"-165.1840"}},"phone":"166.955.4414 x7602","website":"margarete.name","company":{"name":"White, McGlynn and Towne","catchPhrase":"Visionary high-level architecture","bs":"granular integrate eyeballs"}},{"name":"Wallace Langosh Dr.","username":"Soledad19","email":"[email protected]","address":{"street":"Eugenia Court","suite":"Apt. 428","city":"Port Christina","zipcode":"70719","geo":{"lat":"-45.5712","lng":"-80.4556"}},"phone":"657.279.0788","website":"cleveland.info","company":{"name":"Jacobson - Reichert","catchPhrase":"Inverse encompassing forecast","bs":"interactive drive functionalities"}},{"name":"Maiya Wisoky Miss","username":"Carmela21","email":"[email protected]","address":{"street":"Jones Skyway","suite":"Suite 881","city":"Hailee bury","zipcode":"57412","geo":{"lat":"67.8634","lng":"-74.3130"}},"phone":"1-144-141-0238 x2729","website":"lenny.com","company":{"name":"Breitenberg, Crooks and Mitchell","catchPhrase":"Exclusive composite task-force","bs":"proactive implement users"}},{"name":"Maia Kuvalis","username":"Nickolas_Schultz","email":"[email protected]","address":{"street":"Ignacio Mills","suite":"Suite 739","city":"Mia borough","zipcode":"99199-9214","geo":{"lat":"51.9007","lng":"77.0518"}},"phone":"1-994-659-7884","website":"edna.org","company":{"name":"Jacobson - Balistreri","catchPhrase":"Cross-group cohesive firmware","bs":"magnetic empower deliverables"}},{"name":"Maia DuBuque","username":"Tyra.Okuneva","email":"[email protected]","address":{"street":"O'Conner Port","suite":"Apt. 287","city":"New Clemmie","zipcode":"80761-0340","geo":{"lat":"-50.0736","lng":"-15.5082"}},"phone":"(706) 676-8126 x832","website":"drew.biz","company":{"name":"Lueilwitz LLC","catchPhrase":"Implemented intermediate functionalities","bs":"best-of-breed incubate niches"}},{"name":"Ruben Goodwin","username":"Laisha87","email":"[email protected]","address":{"street":"McDermott Road","suite":"Suite 614","city":"Lake Gabriella","zipcode":"64316-4854","geo":{"lat":"20.9836","lng":"93.3492"}},"phone":"449.228.3981","website":"theron.com","company":{"name":"Medhurst LLC","catchPhrase":"Extended demand-driven encryption","bs":"24/7 architect schemas"}},{"name":"Dandre Feeney","username":"Saul.Larkin","email":"[email protected]","address":{"street":"Donnelly Center","suite":"Apt. 494","city":"North Angel view","zipcode":"50086-7774","geo":{"lat":"88.8051","lng":"-11.3173"}},"phone":"319.929.6748 x2489","website":"treva.info","company":{"name":"Windler, Dooley and Ruecker","catchPhrase":"Total context-sensitive process improvement","bs":"customized iterate action-items"}},{"name":"Kiarra Howe","username":"Erica_Miller","email":"[email protected]","address":{"street":"Edna Park","suite":"Suite 929","city":"Francis port","zipcode":"04015","geo":{"lat":"13.2335","lng":"-150.1108"}},"phone":"(056) 150-0652","website":"stephany.info","company":{"name":"Cruickshank LLC","catchPhrase":"Secured clear-thinking analyzer","bs":"proactive maximize content"}},{"name":"Arthur Simonis","username":"Izabella_DuBuque","email":"[email protected]","address":{"street":"Maxie Centers","suite":"Apt. 899","city":"Tate berg","zipcode":"73540","geo":{"lat":"34.1042","lng":"42.0196"}},"phone":"975.142.9607 x63905","website":"toy.name","company":{"name":"Rowe, Kertzmann and Robel","catchPhrase":"Operative uniform artificial intelligence","bs":"24/7 innovate ROI"}},{"name":"Houston O'Keefe","username":"Sydnie.Hoppe","email":"[email protected]","address":{"street":"Jamison Skyway","suite":"Apt. 844","city":"Evie chester","zipcode":"13939","geo":{"lat":"-67.9893","lng":"87.6590"}},"phone":"434.310.3964 x83713","website":"kylee.name","company":{"name":"Veum, Vandervort and D'Amore","catchPhrase":"Realigned fault-tolerant definition","bs":"synergistic e-enable technologies"}}] \ No newline at end of file
diff --git a/examples/node/dataSet.json b/examples/node/dataSet.json
new file mode 100644
index 00000000..d7436b09
--- /dev/null
+++ b/examples/node/dataSet.json
@@ -0,0 +1 @@
+{"name":"Celestine Stracke","username":"Angelica.Weimann","email":"[email protected]","address":{"street":"Aubrey Track","suite":"Suite 437","city":"South Liana","zipcode":"92739","geo":{"lat":"-20.3782","lng":"-51.5498"}},"phone":"887-731-9357 x3878","website":"irma.biz","company":{"name":"Lockman - Veum","catchPhrase":"Future-proofed actuating collaboration","bs":"cross-media synergize e-tailers"}} \ No newline at end of file
diff --git a/examples/node/generateSet.js b/examples/node/generateSet.js
new file mode 100644
index 00000000..3bcd42ad
--- /dev/null
+++ b/examples/node/generateSet.js
@@ -0,0 +1,19 @@
+var fs = require('fs');
+
+var faker= require('../../index');
+
+
+// generate dataSet as example
+fs.writeFile(__dirname + '/dataSet.json', JSON.stringify(faker.helpers.userCard()), function() {
+ console.log("dataSet generated successfully!");
+});
+// generate bigDataSet as example
+var bigSet = [];
+
+for(i = 20; i >= 0; i--){
+ bigSet.push(faker.helpers.userCard());
+};
+
+fs.writeFile(__dirname + '/bigDataSet.json', JSON.stringify(bigSet), function() {
+ console.log("bigDataSet generated successfully!");
+});
diff --git a/examples/node/generators.js b/examples/node/generators.js
new file mode 100644
index 00000000..b74ed301
--- /dev/null
+++ b/examples/node/generators.js
@@ -0,0 +1,13 @@
+var faker = require('../../index');
+
+faker.locale = "en";
+
+
+
+console.log(faker.fake('{{name.lastName}}, {{name.firstName}} {{name.suffix}}'));
+
+
+console.log(faker.fake('{{finance.currencyName}} - {{finance.amount}}'));
+
+
+console.log(faker.fake('{{name.firstName}} {{name.lastName}}')); \ No newline at end of file
diff --git a/examples/node/minimal-usage.js b/examples/node/minimal-usage.js
new file mode 100755
index 00000000..fed063a4
--- /dev/null
+++ b/examples/node/minimal-usage.js
@@ -0,0 +1,13 @@
+#!/usr/bin/env node
+
+var faker = require('../../index');
+faker.locale = "en";
+
+//console.log(faker.address)
+console.log(faker.internet.email())
+console.log(faker.date.recent())
+console.log(faker.helpers.contextualCard());
+
+faker.locale = "uk";
+
+console.log(faker.helpers.contextualCard()); \ No newline at end of file
diff --git a/examples/node/singleLocale.js b/examples/node/singleLocale.js
new file mode 100644
index 00000000..e5b504f3
--- /dev/null
+++ b/examples/node/singleLocale.js
@@ -0,0 +1,7 @@
+var faker = require('../locale/en');
+
+console.log(faker.name.findName());
+
+var faker = require('../locale/uk');
+
+console.log(faker.name.findName()); \ No newline at end of file