faker 1.0.0 → 6.6.6

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of faker might be problematic. Click here for more details.

Files changed (60) hide show
  1. package/.eslintrc +54 -0
  2. package/.gitattributes +1 -0
  3. package/.github/FUNDING.yml +12 -0
  4. package/.travis.yml +7 -3
  5. package/.versions +23 -0
  6. package/Readme.md +1 -46
  7. package/package.json +70 -23
  8. package/.jshintrc +0 -87
  9. package/.npmignore +0 -16
  10. package/BUILD/BUILD.js +0 -139
  11. package/BUILD/Mustache.js +0 -296
  12. package/BUILD/docs.js +0 -62
  13. package/BUILD/main.js +0 -60
  14. package/MIT-LICENSE.txt +0 -20
  15. package/Makefile +0 -26
  16. package/examples/bigDataSet.json +0 -1
  17. package/examples/browser_test.html +0 -40
  18. package/examples/dataSet.json +0 -1
  19. package/examples/index.html +0 -77
  20. package/examples/js/faker.js +0 -730
  21. package/examples/js/jquery.js +0 -154
  22. package/examples/js/prettyPrint.js +0 -712
  23. package/examples/library_test.js +0 -9
  24. package/examples/node_generateSet.js +0 -20
  25. package/examples/node_min_test.js +0 -9
  26. package/faker.js +0 -730
  27. package/index.js +0 -31
  28. package/lib/address.js +0 -100
  29. package/lib/company.js +0 -36
  30. package/lib/date.js +0 -42
  31. package/lib/definitions.js +0 -1398
  32. package/lib/helpers.js +0 -124
  33. package/lib/image.js +0 -58
  34. package/lib/internet.js +0 -53
  35. package/lib/lorem.js +0 -45
  36. package/lib/name.js +0 -34
  37. package/lib/phone_number.js +0 -16
  38. package/lib/random.js +0 -106
  39. package/lib/tree.js +0 -69
  40. package/lib/version.js +0 -0
  41. package/logo.png +0 -0
  42. package/minfaker.js +0 -35
  43. package/test/address.unit.js +0 -293
  44. package/test/all.functional.js +0 -47
  45. package/test/browser.unit.html +0 -28
  46. package/test/company.unit.js +0 -110
  47. package/test/date.unit.js +0 -65
  48. package/test/helpers.unit.js +0 -62
  49. package/test/image.unit.js +0 -108
  50. package/test/internet.unit.js +0 -92
  51. package/test/lorem.unit.js +0 -178
  52. package/test/mocha.opts +0 -5
  53. package/test/name.unit.js +0 -87
  54. package/test/phone_number.unit.js +0 -29
  55. package/test/run.js +0 -68
  56. package/test/support/chai.js +0 -3403
  57. package/test/support/sinon-1.5.2.js +0 -4153
  58. package/test/support/walk_dir.js +0 -43
  59. package/test/tree.unit.js +0 -108
  60. /package/{.jshintignore → .eslintignore} +0 -0
package/BUILD/Mustache.js DELETED
@@ -1,296 +0,0 @@
1
- /*
2
- mustache.js — Logic-less templates in JavaScript
3
-
4
- See http://mustache.github.com/ for more info.
5
- */
6
-
7
- var Mustache = exports.Mustache = function() {
8
- var Renderer = function() {};
9
-
10
- Renderer.prototype = {
11
- otag: "{{",
12
- ctag: "}}",
13
- pragmas: {},
14
- buffer: [],
15
- pragmas_implemented: {
16
- "IMPLICIT-ITERATOR": true
17
- },
18
-
19
- render: function(template, context, partials, in_recursion) {
20
- // fail fast
21
- if(template.indexOf(this.otag) == -1) {
22
- if(in_recursion) {
23
- return template;
24
- } else {
25
- this.send(template);
26
- return;
27
- }
28
- }
29
-
30
- if(!in_recursion) {
31
- this.buffer = [];
32
- }
33
-
34
- template = this.render_pragmas(template);
35
- var html = this.render_section(template, context, partials);
36
- if(in_recursion) {
37
- return this.render_tags(html, context, partials, in_recursion);
38
- }
39
-
40
- this.render_tags(html, context, partials, in_recursion);
41
- },
42
-
43
- /*
44
- Sends parsed lines
45
- */
46
- send: function(line) {
47
- if(line != "") {
48
- this.buffer.push(line);
49
- }
50
- },
51
-
52
- /*
53
- Looks for %PRAGMAS
54
- */
55
- render_pragmas: function(template) {
56
- // no pragmas
57
- if(template.indexOf(this.otag + "%") == -1) {
58
- return template;
59
- }
60
-
61
- var that = this;
62
- var regex = new RegExp(this.otag + "%([\\w_-]+) ?([\\w]+=[\\w]+)?"
63
- + this.ctag);
64
- return template.replace(regex, function(match, pragma, options) {
65
- if(!that.pragmas_implemented[pragma]) {
66
- throw({message: "This implementation of mustache doesn't understand the '"
67
- + pragma + "' pragma"});
68
- }
69
- that.pragmas[pragma] = {};
70
- if(options) {
71
- var opts = options.split("=");
72
- that.pragmas[pragma][opts[0]] = opts[1];
73
- }
74
- return "";
75
- // ignore unknown pragmas silently
76
- });
77
- },
78
-
79
- /*
80
- Tries to find a partial in the global scope and render it
81
- */
82
- render_partial: function(name, context, partials) {
83
- if(!partials || !partials[name]) {
84
- throw({message: "unknown_partial '" + name + "'"});
85
- }
86
- if(typeof(context[name]) != "object") {
87
- return partials[name];
88
- }
89
- return this.render(partials[name], context[name], partials, true);
90
- },
91
-
92
- /*
93
- Renders boolean and enumerable sections
94
- */
95
- render_section: function(template, context, partials) {
96
- if(template.indexOf(this.otag + "#") == -1) {
97
- return template;
98
- }
99
- var that = this;
100
- // CSW - Added "+?" so it finds the tighest bound, not the widest
101
- var regex = new RegExp(this.otag + "\\#(.+)" + this.ctag +
102
- "\\s*([\\s\\S]+?)" + this.otag + "\\/\\1" + this.ctag + "\\s*", "mg");
103
-
104
- // for each {{#foo}}{{/foo}} section do...
105
- return template.replace(regex, function(match, name, content) {
106
- var value = that.find(name, context);
107
- if(that.is_array(value)) { // Enumerable, Let's loop!
108
- return that.map(value, function(row) {
109
- return that.render(content, that.merge(context,
110
- that.create_context(row)), partials, true);
111
- }).join("");
112
- } else if(value) { // boolean section
113
- return that.render(content, context, partials, true);
114
- } else {
115
- return "";
116
- }
117
- });
118
- },
119
-
120
- /*
121
- Replace {{foo}} and friends with values from our view
122
- */
123
- render_tags: function(template, context, partials, in_recursion) {
124
- // tit for tat
125
- var that = this;
126
-
127
- var new_regex = function() {
128
- return new RegExp(that.otag + "(=|!|>|\\{|%)?([^\/#]+?)\\1?" +
129
- that.ctag + "+", "g");
130
- };
131
-
132
- var regex = new_regex();
133
- var lines = template.split("\n");
134
- for (var i=0; i < lines.length; i++) {
135
- lines[i] = lines[i].replace(regex, function(match, operator, name) {
136
- switch(operator) {
137
- case "!": // ignore comments
138
- return match;
139
- case "=": // set new delimiters, rebuild the replace regexp
140
- that.set_delimiters(name);
141
- regex = new_regex();
142
- return "";
143
- case ">": // render partial
144
- return that.render_partial(name, context, partials);
145
- case "{": // the triple mustache is unescaped
146
- return that.find(name, context);
147
- default: // escape the value
148
- return that.escape(that.find(name, context));
149
- }
150
- }, this);
151
- if(!in_recursion) {
152
- this.send(lines[i]);
153
- }
154
- }
155
-
156
- if(in_recursion) {
157
- return lines.join("\n");
158
- }
159
- },
160
-
161
- set_delimiters: function(delimiters) {
162
- var dels = delimiters.split(" ");
163
- this.otag = this.escape_regex(dels[0]);
164
- this.ctag = this.escape_regex(dels[1]);
165
- },
166
-
167
- escape_regex: function(text) {
168
- // thank you Simon Willison
169
- if(!arguments.callee.sRE) {
170
- var specials = [
171
- '/', '.', '*', '+', '?', '|',
172
- '(', ')', '[', ']', '{', '}', '\\'
173
- ];
174
- arguments.callee.sRE = new RegExp(
175
- '(\\' + specials.join('|\\') + ')', 'g'
176
- );
177
- }
178
- return text.replace(arguments.callee.sRE, '\\$1');
179
- },
180
-
181
- /*
182
- find `name` in current `context`. That is find me a value
183
- from the view object
184
- */
185
- find: function(name, context) {
186
- name = this.trim(name);
187
- if(typeof context[name] === "function") {
188
- return context[name].apply(context);
189
- }
190
- if(context[name] !== undefined) {
191
- return context[name];
192
- }
193
- // silently ignore unkown variables
194
- return "";
195
- },
196
-
197
- // Utility methods
198
-
199
- /*
200
- Does away with nasty characters
201
- */
202
- escape: function(s) {
203
- return ((s == null) ? "" : s).toString().replace(/[&"<>\\]/g, function(s) {
204
- switch(s) {
205
- case "&": return "&amp;";
206
- case "\\": return "\\\\";;
207
- case '"': return '\"';;
208
- case "<": return "&lt;";
209
- case ">": return "&gt;";
210
- default: return s;
211
- }
212
- });
213
- },
214
-
215
- /*
216
- Merges all properties of object `b` into object `a`.
217
- `b.property` overwrites a.property`
218
- */
219
- merge: function(a, b) {
220
- var _new = {};
221
- for(var name in a) {
222
- if(a.hasOwnProperty(name)) {
223
- _new[name] = a[name];
224
- }
225
- };
226
- for(var name in b) {
227
- if(b.hasOwnProperty(name)) {
228
- _new[name] = b[name];
229
- }
230
- };
231
- return _new;
232
- },
233
-
234
- // by @langalex, support for arrays of strings
235
- create_context: function(_context) {
236
- if(this.is_object(_context)) {
237
- return _context;
238
- } else if(this.pragmas["IMPLICIT-ITERATOR"]) {
239
- var iterator = this.pragmas["IMPLICIT-ITERATOR"].iterator || ".";
240
- var ctx = {};
241
- ctx[iterator] = _context;
242
- return ctx;
243
- }
244
- },
245
-
246
- is_object: function(a) {
247
- return a && typeof a == "object";
248
- },
249
-
250
- is_array: function(a) {
251
- return Object.prototype.toString.call(a) === '[object Array]';
252
- },
253
-
254
- /*
255
- Gets rid of leading and trailing whitespace
256
- */
257
- trim: function(s) {
258
- return s.replace(/^\s*|\s*$/g, "");
259
- },
260
-
261
- /*
262
- Why, why, why? Because IE. Cry, cry cry.
263
- */
264
- map: function(array, fn) {
265
- if (typeof array.map == "function") {
266
- return array.map(fn);
267
- } else {
268
- var r = [];
269
- var l = array.length;
270
- for(var i=0;i<l;i++) {
271
- r.push(fn(array[i]));
272
- }
273
- return r;
274
- }
275
- }
276
- };
277
-
278
- return({
279
- name: "mustache.js",
280
- version: "0.2.3",
281
-
282
- /*
283
- Turns a template and view into HTML
284
- */
285
- to_html: function(template, view, partials, send_fun) {
286
- var renderer = new Renderer();
287
- if(send_fun) {
288
- renderer.send = send_fun;
289
- }
290
- renderer.render(template, view, partials);
291
- if(!send_fun) {
292
- return renderer.buffer.join("\n");
293
- }
294
- }
295
- });
296
- }();
package/BUILD/docs.js DELETED
@@ -1,62 +0,0 @@
1
- # faker.js - generate massive amounts of fake data in the browser and node.js
2
- <img src = "http://imgur.com/KiinQ.png" border = "0">
3
-
4
- ## USAGE
5
-
6
- ### browser -
7
-
8
- <script src = "faker.js" type = "text/javascript"></script>
9
- <script>
10
- var randomName = faker.Name.findName(); // Caitlyn Kerluke
11
- var randomEmail = faker.Internet.email(); // Rusty@arne.info
12
- var randomCard = faker.Helpers.createCard(); // random contact card containing many properties
13
- </script>
14
-
15
- ### node.js -
16
-
17
- ### usage
18
-
19
- var faker = require('./faker');
20
-
21
- var randomName = faker.Name.findName(); // Rowan Nikolaus
22
- var randomEmail = faker.Internet.email(); // Kassandra.Haley@erich.biz
23
- var randomCard = faker.Helpers.createCard(); // random contact card containing many properties
24
-
25
-
26
- ## API
27
-
28
- {{{API}}}
29
-
30
- ## Tests
31
- npm install .
32
- make test
33
-
34
- You can view a code coverage report generated in coverage/lcov-report/index.html.
35
-
36
- ## Authors
37
-
38
- ####Matthew Bergman & Marak Squires
39
-
40
- Heavily inspired by Benjamin Curtis's Ruby Gem [faker](http://faker.rubyforge.org/) and Perl's [Data::faker](http://search.cpan.org/~jasonk/Data-faker-0.07/lib/Data/faker.pm)
41
-
42
- <br/>
43
- Copyright (c) {{copyrightYear}} Matthew Bergman & Marak Squires http://github.com/marak/faker.js/
44
- <br/>
45
- Permission is hereby granted, free of charge, to any person obtaining
46
- a copy of this software and associated documentation files (the
47
- "Software"), to deal in the Software without restriction, including
48
- without limitation the rights to use, copy, modify, merge, publish,
49
- distribute, sublicense, and/or sell copies of the Software, and to
50
- permit persons to whom the Software is furnished to do so, subject to
51
- the following conditions:
52
- <br/>
53
- The above copyright notice and this permission notice shall be
54
- included in all copies or substantial portions of the Software.
55
- <br/>
56
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
57
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
58
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
59
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
60
- LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
61
- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
62
- WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
package/BUILD/main.js DELETED
@@ -1,60 +0,0 @@
1
- /*
2
- Copyright (c) 2010 Matthew Bergman & Marak Squires http://github.com/marak/faker.js/
3
-
4
- Permission is hereby granted, free of charge, to any person obtaining
5
- a copy of this software and associated documentation files (the
6
- "Software"), to deal in the Software without restriction, including
7
- without limitation the rights to use, copy, modify, merge, publish,
8
- distribute, sublicense, and/or sell copies of the Software, and to
9
- permit persons to whom the Software is furnished to do so, subject to
10
- the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be
13
- included in all copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
18
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
19
- LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
20
- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
21
- WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22
- */
23
-
24
- /*************** AUTOGENERATED @ {{today}} ***************
25
-
26
- WARNING: THIS FILE WAS AUTOGENERATED BY THE faker BUILD SCRIPT
27
- MODIFYING THIS FILE IS FINE, BUT YOU REALLY SHOULD BE MODIFYING
28
- THE LIBRARY DIRECTLY AND REGENERATING THIS FILE USING BUILD.js!!!!
29
-
30
-
31
- faker.js - Written by Matthew Bergman and Marak Squires
32
-
33
- ## USAGE
34
-
35
- ### browser -
36
-
37
- <script src = "faker.js" type = "text/javascript"></script>
38
- <script>
39
- var randomName = faker.Name.findName(); // Caitlyn Kerluke
40
- var randomEmail = faker.Internet.email(); // Rusty@arne.info
41
- var randomCard = faker.Helpers.createCard(); // random contact card containing many properties
42
- </script>
43
-
44
- ### node.js -
45
-
46
- var faker = require('./faker');
47
-
48
- var randomName = faker.Name.findName(); // Rowan Nikolaus
49
- var randomEmail = faker.Internet.email(); // Kassandra.Haley@erich.biz
50
- var randomCard = faker.Helpers.createCard(); // random contact card containing many properties
51
-
52
- */
53
- !(function(){
54
-
55
- 'use strict';
56
-
57
- // exported module
58
- var faker = {};
59
-
60
- faker.version = "{{version}}";
package/MIT-LICENSE.txt DELETED
@@ -1,20 +0,0 @@
1
- Copyright (c) 2014 Matthew Bergman & Marak Squires http://github.com/marak/faker.js/
2
-
3
- Permission is hereby granted, free of charge, to any person obtaining
4
- a copy of this software and associated documentation files (the
5
- "Software"), to deal in the Software without restriction, including
6
- without limitation the rights to use, copy, modify, merge, publish,
7
- distribute, sublicense, and/or sell copies of the Software, and to
8
- permit persons to whom the Software is furnished to do so, subject to
9
- the following conditions:
10
-
11
- The above copyright notice and this permission notice shall be
12
- included in all copies or substantial portions of the Software.
13
-
14
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
- LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
- WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
package/Makefile DELETED
@@ -1,26 +0,0 @@
1
- BASE = .
2
-
3
- ISTANBUL = ./node_modules/.bin/istanbul
4
- COVERAGE_OPTS = --lines 95 --statements 95 --branches 95 --functions 95
5
-
6
- main: lint test
7
-
8
- build:
9
- cd BUILD && node BUILD.js
10
-
11
- cover:
12
- $(ISTANBUL) cover test/run.js --root ./lib -- -T unit,functional
13
-
14
- check-coverage:
15
- $(ISTANBUL) check-coverage $(COVERAGE_OPTS)
16
-
17
- test: cover check-coverage
18
-
19
- test-cov: cover check-coverage
20
- open coverage/lcov-report/index.html
21
-
22
- lint:
23
- ./node_modules/jshint/bin/hint ./lib --config $(BASE)/.jshintrc
24
-
25
-
26
- .PHONY: test, build
@@ -1 +0,0 @@
1
- [{"name":"Liliana Gibson","username":"Madelyn","email":"Armand@tavares.biz","address":{"street":"Leffler Unions","suite":"Suite 102","city":"Lake Jonatan","zipcode":"60579"},"phone":"(457)497-4068","website":"margarette.uk","company":{"name":"Bruen,Altenwerth and Heathcote","catchPhrase":"Innovative fault-tolerant superstructure","bs":"synergize out-of-the-box partnerships"}},{"name":"Shanie Hauck","username":"Katheryn","email":"Sally@zackery.com","address":{"street":"Balistreri Fields","suite":"Apt. 287","city":"Marafurt","zipcode":"91572"},"phone":"216-402-6789 x1647","website":"hanna.ca","company":{"name":"Abbott-Hermann","catchPhrase":"Extended modular info-mediaries","bs":"evolve granular technologies"}},{"name":"Liliane Fay","username":"Clinton","email":"Josue@dillon.name","address":{"street":"Kihn Road","suite":"Apt. 148","city":"Lenoraborough","zipcode":"19689"},"phone":"1-250-798-0995 x172","website":"francesco.ca","company":{"name":"Luettgen,Wehner and Rolfson","catchPhrase":"Cross-platform discrete structure","bs":"whiteboard dynamic e-tailers"}},{"name":"Thalia Hauck","username":"Chauncey","email":"Jaleel_Bogan@zola.name","address":{"street":"Erdman Divide","suite":"Suite 430","city":"Laurinemouth","zipcode":"77403-6880"},"phone":"1-407-468-7819","website":"samson.name","company":{"name":"Christiansen and Sons","catchPhrase":"Self-enabling methodical open system","bs":"exploit real-time bandwidth"}},{"name":"Breanne Willms","username":"Hobart","email":"Dawn@lynn.info","address":{"street":"O'Conner Summit","suite":"Suite 031","city":"Vivienneview","zipcode":"83910"},"phone":"654-791-5113 x5062","website":"arnoldo.info","company":{"name":"Ferry,Boehm and Bednar","catchPhrase":"Intuitive directional knowledge user","bs":"extend mission-critical experiences"}},{"name":"Regan DuBuque","username":"Elyssa","email":"Faye@royal.ca","address":{"street":"Russel Oval","suite":"Apt. 188","city":"Alexzandermouth","zipcode":"99240"},"phone":"225.773.6392","website":"roxanne.us","company":{"name":"Zulauf-Hammes","catchPhrase":"Cross-group zero administration capability","bs":"expedite front-end architectures"}},{"name":"Antonietta Schinner","username":"Theodora.Medhurst","email":"Reyna.Block@lilly.co.uk","address":{"street":"Abbott Street","suite":"Suite 988","city":"East Fredaville","zipcode":"70477-9430"},"phone":"146-545-1914","website":"weldon.biz","company":{"name":"Cruickshank Group","catchPhrase":"Automated well-modulated circuit","bs":"utilize interactive architectures"}},{"name":"Dr. Lester Russel","username":"Kyla","email":"Amina_Barton@eldridge.co.uk","address":{"street":"Kautzer Court","suite":"Apt. 190","city":"Port Lindseyville","zipcode":"44055-3290"},"phone":"1-556-430-7679","website":"michael.com","company":{"name":"D'Amore and Sons","catchPhrase":"Team-oriented background middleware","bs":"morph granular web services"}},{"name":"Cary Reilly","username":"Marcella.Boehm","email":"Pat@jett.uk","address":{"street":"Flatley Locks","suite":"Suite 779","city":"South Addieland","zipcode":"42791-5340"},"phone":"1-669-561-3826 x52188","website":"bradly.info","company":{"name":"Hilpert-Crona","catchPhrase":"Enterprise-wide transitional capacity","bs":"generate dynamic ROI"}},{"name":"Nettie Smitham","username":"Braden_West","email":"Avis@cortez.biz","address":{"street":"Rippin Trace","suite":"Suite 185","city":"South Domenico","zipcode":"17324-3258"},"phone":"(656)404-9278","website":"adolf.name","company":{"name":"Nikolaus-Bergstrom","catchPhrase":"Switchable background conglomeration","bs":"monetize integrated networks"}},{"name":"Lupe Upton","username":"Eli","email":"Marjory_Howell@stanley.com","address":{"street":"Mueller Spurs","suite":"Suite 348","city":"New Keshawn","zipcode":"07420-7542"},"phone":"752.279.1192 x1924","website":"oral.biz","company":{"name":"Skiles Inc","catchPhrase":"Profit-focused 3rd generation architecture","bs":"maximize cross-media eyeballs"}},{"name":"Emma Weimann","username":"Bret","email":"Abner_Marks@otha.us","address":{"street":"Gorczany Hollow","suite":"Suite 353","city":"Lake Jedidiah","zipcode":"87710-9994"},"phone":"1-895-970-8063 x803","website":"alexa.us","company":{"name":"Hayes-Glover","catchPhrase":"Synchronised maximized moderator","bs":"implement open-source portals"}},{"name":"Aubree Dooley","username":"Joanie_Reilly","email":"Alaina@bennett.ca","address":{"street":"Harris Station","suite":"Apt. 067","city":"East Claudie","zipcode":"36323"},"phone":"262.193.2022","website":"rosalia.us","company":{"name":"Fritsch and Sons","catchPhrase":"Horizontal grid-enabled monitoring","bs":"iterate B2C markets"}},{"name":"Modesto Dibbert","username":"Mohammed.Wintheiser","email":"Leonor@owen.name","address":{"street":"Quitzon Station","suite":"Suite 464","city":"North Johnathanville","zipcode":"69325"},"phone":"725-733-4343 x07214","website":"yvonne.com","company":{"name":"Kris-Lynch","catchPhrase":"Diverse upward-trending success","bs":"whiteboard enterprise e-markets"}},{"name":"Jermey Jacobi","username":"Marjory","email":"Jaclyn@juliana.com","address":{"street":"Casper Knolls","suite":"Suite 861","city":"North Lavernville","zipcode":"15883"},"phone":"1-064-055-1029 x6895","website":"kyle.co.uk","company":{"name":"Howe,Collins and Waters","catchPhrase":"Persistent real-time local area network","bs":"disintermediate distributed infomediaries"}},{"name":"Zachariah Smith","username":"Quincy","email":"Rose.Stiedemann@norma.biz","address":{"street":"Miller Estates","suite":"Apt. 681","city":"New Jared","zipcode":"65557"},"phone":"(269)490-9367","website":"christian.ca","company":{"name":"Bradtke and Sons","catchPhrase":"Compatible impactful Graphic Interface","bs":"unleash interactive interfaces"}},{"name":"Tracey Powlowski","username":"Trisha.Greenholt","email":"Laney@rollin.com","address":{"street":"Lemke Shore","suite":"Suite 151","city":"Patriciashire","zipcode":"09804-1321"},"phone":"1-624-426-5456 x5507","website":"scarlett.biz","company":{"name":"Lockman-Kuvalis","catchPhrase":"Enhanced context-sensitive interface","bs":"enable real-time convergence"}},{"name":"Nickolas Bauch","username":"Romaine","email":"Shania@eli.ca","address":{"street":"Streich Pine","suite":"Apt. 536","city":"New Sammie","zipcode":"60826"},"phone":"466.621.4430 x7410","website":"selina.co.uk","company":{"name":"Howe and Sons","catchPhrase":"Robust analyzing help-desk","bs":"disintermediate real-time convergence"}},{"name":"Kristina Grant","username":"Magnolia_Quigley","email":"Katrine@albertha.us","address":{"street":"Roob Tunnel","suite":"Apt. 630","city":"North Gaylord","zipcode":"52101"},"phone":"(597)488-0874 x21090","website":"chanelle.info","company":{"name":"Gorczany-Will","catchPhrase":"Triple-buffered interactive framework","bs":"maximize front-end models"}},{"name":"Albertha Walter","username":"Freda","email":"Rosie.Kohler@dedrick.biz","address":{"street":"Blanda Grove","suite":"Apt. 724","city":"Port Tyrique","zipcode":"68900"},"phone":"548.845.1835","website":"ottis.uk","company":{"name":"Hayes LLC","catchPhrase":"Innovative global process improvement","bs":"morph enterprise channels"}},{"name":"Alexandria Kovacek","username":"Mittie","email":"Laurine_Heathcote@wendy.com","address":{"street":"Bailey Turnpike","suite":"Suite 729","city":"South Dawnview","zipcode":"47868"},"phone":"382.233.0380 x03245","website":"jarrod.ca","company":{"name":"O'Keefe-Keeling","catchPhrase":"Balanced user-facing collaboration","bs":"enable cross-platform bandwidth"}}]
@@ -1,40 +0,0 @@
1
- <html>
2
- <head>
3
- <script src = "../faker.js" type = "text/javascript"></script>
4
- <script>
5
- var card = faker.Helpers.createCard();
6
- if(typeof JSON == 'undefined'){
7
- document.write('get a real browser that has JSON.stringify and JSON.parse built in <br/>');
8
- // implement JSON.stringify serialization
9
- var JSON = {};
10
- JSON.stringify = function (obj) {
11
- var t = typeof (obj);
12
- if (t != "object" || obj === null) {
13
- // simple data type
14
- if (t == "string") obj = '"'+obj+'"';
15
- return String(obj);
16
- }
17
- else {
18
- // recurse array or object
19
- var n, v, json = [], arr = (obj && obj.constructor == Array);
20
- for (n in obj) {
21
- v = obj[n]; t = typeof(v);
22
- if (t == "string") v = '"'+v+'"';
23
- else if (t == "object" && v !== null) v = JSON.stringify(v);
24
- json.push((arr ? "" : '"' + n + '":') + String(v));
25
- }
26
- return (arr ? "[" : "{") + String(json) + (arr ? "]" : "}");
27
- }
28
- };
29
- }
30
- document.write(JSON.stringify(card));
31
- </script>
32
- </head>
33
- <body>
34
- </body>
35
- </html>
36
-
37
-
38
-
39
-
40
-
@@ -1 +0,0 @@
1
- {"name":"Oswald Goldner","username":"Izaiah","email":"Michael@nicola.us","address":{"street":"Legros Summit","suite":"Suite 061","city":"Lake Jaydeburgh","zipcode":"35411-3193"},"phone":"1-658-413-1550","website":"buddy.ca","company":{"name":"Quigley Group","catchPhrase":"Organized content-based encoding","bs":"generate e-business solutions"}}
@@ -1,77 +0,0 @@
1
- <html>
2
- <head>
3
- <title>faker.js - generate massive amounts of fake data in Node.js and the browser</title>
4
- <script src = "js/jquery.js" type = "text/javascript"></script>
5
- <script src = "js/prettyPrint.js" type = "text/javascript"></script>
6
- <script src = "js/faker.js" type = "text/javascript"></script>
7
-
8
- <script>
9
-
10
- if(typeof JSON == 'undefined'){
11
- document.write('get a real browser that has JSON.stringify and JSON.parse built in <br/>');
12
-
13
- // implement JSON.stringify serialization
14
- var JSON = {};
15
- JSON.stringify = function (obj) {
16
- var t = typeof (obj);
17
- if (t != "object" || obj === null) {
18
- // simple data type
19
- if (t == "string") obj = '"'+obj+'"';
20
- return String(obj);
21
- }
22
- else {
23
- // recurse array or object
24
- var n, v, json = [], arr = (obj && obj.constructor == Array);
25
- for (n in obj) {
26
- v = obj[n]; t = typeof(v);
27
- if (t == "string") v = '"'+v+'"';
28
- else if (t == "object" && v !== null) v = JSON.stringify(v);
29
- json.push((arr ? "" : '"' + n + '":') + String(v));
30
- }
31
- return (arr ? "[" : "{") + String(json) + (arr ? "]" : "}");
32
- }
33
- };
34
- }
35
-
36
- $(document).ready(function(e){
37
-
38
- var card = faker.Helpers.createCard();
39
- $('#output').html(prettyPrint(card));
40
-
41
- $('#generate').click(function(){
42
- var card = faker.Helpers.createCard();
43
- $('#output').html(prettyPrint(card));
44
- });
45
-
46
- $('#generateSet').click(function(){
47
-
48
- setTimeout(function(){
49
- var cards = [];
50
- for(var i = 0; i < $('#cardCount').val(); i++){
51
- var card = faker.Helpers.createCard();
52
- cards.push(card);
53
- }
54
- $('#output').html('<textarea cols = "100" rows = "100">'+JSON.stringify(cards)+'</textarea>');
55
- }, 10);
56
-
57
- });
58
-
59
- });
60
-
61
- </script>
62
- </head>
63
- <body>
64
- <h1>faker.js - generate massive amounts of fake data in Node.js and the browser</h1>
65
- <a href="http://github.com/marak/faker.js/"><img style="position:absolute; z-index:10; top: 0; right: 0; border: 0;" src="http://s3.amazonaws.com/github/ribbons/forkme_right_gray_6d6d6d.png" alt="Fork me on GitHub" /></a>
66
- <input id = "generate" type = "button" value = "generate one random card as HTML" />
67
- <input id = "generateSet" type = "button" value = "generate an assosative array of random cards as JSON" />
68
- card count : <input id = "cardCount" type = "text" size = "3" value = "5" /><br/><br/>
69
- <strong>protip</strong>: open your console on this page and run: <code>console.log(faker); var randomName = faker.Name.findName(); console.log(randomName);</code><hr/>
70
- <div id = "output"></div>
71
- </body>
72
- </html>
73
-
74
-
75
-
76
-
77
-