From 218a36dfbcd6548a596261d4b575683cfabbb952 Mon Sep 17 00:00:00 2001 From: Martin Date: Mon, 16 Sep 2013 02:13:39 +0200 Subject: [PATCH] added faker.js --- ajax/libs/Faker/0.5.11/MinFaker.js | 30 ++++++++++++++++++++++++++++++ ajax/libs/Faker/package.json | 26 ++++++++++++++++++++++++++ 2 files changed, 56 insertions(+) create mode 100644 ajax/libs/Faker/0.5.11/MinFaker.js create mode 100644 ajax/libs/Faker/package.json diff --git a/ajax/libs/Faker/0.5.11/MinFaker.js b/ajax/libs/Faker/0.5.11/MinFaker.js new file mode 100644 index 000000000..4bbcd4779 --- /dev/null +++ b/ajax/libs/Faker/0.5.11/MinFaker.js @@ -0,0 +1,30 @@ +!function(){var a={version:"0.5.5",Name:{}};a.Name.firstName=function(){return a.random.first_name()};a.Name.lastName=function(){return a.random.last_name()};a.Name.findName=function(){switch(a.random.number(8)){case 0:return a.random.name_prefix()+" "+this.firstName()+" "+this.lastName();case 1:return this.firstName()+" "+this.lastName()+" "+a.random.name_suffix()}return this.firstName()+" "+this.lastName()};a.Address={};a.Address.zipCode=function(){return e.replaceSymbolWithNumber(a.random.array_element(["#####", +"#####-####"]))};a.Address.zipCodeFormat=function(a){return e.replaceSymbolWithNumber(["#####","#####-####"][a])};a.Address.city=function(){var b;switch(a.random.number(4)){case 0:b=a.random.city_prefix()+" "+a.random.first_name()+a.random.city_suffix();break;case 1:b=a.random.city_prefix()+" "+a.random.first_name();break;case 2:b=a.random.first_name()+a.random.city_suffix();break;case 3:b=a.random.last_name()+a.random.city_suffix()}return b};a.Address.streetName=function(){var b;switch(a.random.number(2)){case 0:b= +a.random.last_name()+" "+a.random.street_suffix();break;case 1:b=a.random.first_name()+" "+a.random.street_suffix()}return b};a.Address.streetAddress=function(b){void 0===b&&(b=!1);var d="";switch(a.random.number(3)){case 0:d=e.replaceSymbolWithNumber("#####")+" "+this.streetName();break;case 1:d=e.replaceSymbolWithNumber("####")+" "+this.streetName();break;case 2:d=e.replaceSymbolWithNumber("###")+" "+this.streetName()}return b?d+" "+this.secondaryAddress():d};a.Address.secondaryAddress=function(){return e.replaceSymbolWithNumber(a.random.array_element(["Apt. ###", +"Suite ###"]))};a.Address.brState=function(b){return b?a.random.br_state_abbr():a.random.br_state()};a.Address.ukCounty=function(){return a.random.uk_county()};a.Address.ukCountry=function(){return a.random.uk_country()};a.Address.usState=function(b){return b?a.random.us_state_abbr():a.random.us_state()};a.Address.latitude=function(){return(a.random.number(18E5)/1E4-90).toFixed(4)};a.Address.longitude=function(){return(a.random.number(36E5)/1E4-180).toFixed(4)};a.PhoneNumber={};a.PhoneNumber.phoneNumber= +function(){return e.replaceSymbolWithNumber(a.random.phone_formats())};a.PhoneNumber.phoneNumberFormat=function(a){return e.replaceSymbolWithNumber(c.phone_formats[a])};a.Internet={};a.Internet.email=function(){return a.Helpers.slugify(this.userName())+"@"+a.Helpers.slugify(this.domainName())};a.Internet.userName=function(){var b;switch(a.random.number(2)){case 0:b=a.random.first_name();break;case 1:b=a.random.first_name()+a.random.array_element([".","_"])+a.random.last_name()}return b};a.Internet.domainName= +function(){return this.domainWord()+"."+a.random.domain_suffix()};a.Internet.domainWord=function(){return a.random.first_name().toLowerCase()};a.Internet.ip=function(){for(var a=[],d=0;4>d;d++)a[d]=(254*Math.random()+1).toFixed(0);return a.join(".")};a.Company={};a.Company.suffixes=function(){return["Inc","and Sons","LLC","Group","and Daughters"]};a.Company.companyName=function(b){switch(b?b:a.random.number(3)){case 0:return a.Name.lastName()+" "+this.companySuffix();case 1:return a.Name.lastName()+ +"-"+a.Name.lastName();case 2:return a.Name.lastName()+", "+a.Name.lastName()+" and "+a.Name.lastName()}};a.Company.companySuffix=function(){return a.random.array_element(this.suffixes())};a.Company.catchPhrase=function(){return a.random.catch_phrase_adjective()+" "+a.random.catch_phrase_descriptor()+" "+a.random.catch_phrase_noun()};a.Company.bs=function(){return a.random.bs_adjective()+" "+a.random.bs_buzz()+" "+a.random.bs_noun()};a.Lorem={};a.Lorem.words=function(a){"undefined"==typeof a&&(a=3); +return e.shuffle(c.lorem).slice(0,a)};a.Lorem.sentence=function(b){"undefined"==typeof b&&(b=3);return this.words(b+a.random.number(7)).join(" ")};a.Lorem.sentences=function(a){"undefined"==typeof a&&(a=3);var d=[];for(a;0", + "repository": { + "type": "git", + "url": "http://github.com/Marak/Faker.js.git" + }, + "scripts": { + "test": "node_modules/.bin/mocha test/*.*.js" + }, + "devDependencies": { + "jshint": "0.9.0", + "istanbul": "0.1.25", + "mocha": "1.7.4", + "node-minify": "*", + "optimist" : "0.3.5", + "sinon": "1.4.2" + }, + "engine": [ + "node >=0.1.90" + ], + "main": "index" +}