diff --git a/Faker.js b/Faker.js index 10611600e..3c3226c8e 100644 --- a/Faker.js +++ b/Faker.js @@ -17,7 +17,7 @@ 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. */ -/*************** AUTOGENERATED @ 1399264537739 *************** +/*************** AUTOGENERATED @ 1399266332795 *************** WARNING: THIS FILE WAS AUTOGENERATED BY THE FAKER BUILD SCRIPT MODIFYING THIS FILE IS FINE, BUT YOU REALLY SHOULD BE MODIFYING THE LIBRARY DIRECTLY AND REGENERATING THIS FILE USING BUILD.js!!!! @@ -260,55 +260,55 @@ Faker.Image.imageUrl = function (width, height, category) { }; Faker.Image.abstractImage = function (width, height) { - return image.imageUrl(width, height, 'abstract'); + return this.imageUrl(width, height, 'abstract'); }; Faker.Image.animals = function (width, height) { - return image.imageUrl(width, height, 'animals'); + return this.imageUrl(width, height, 'animals'); }; Faker.Image.business = function (width, height) { - return image.imageUrl(width, height, 'business'); + return this.imageUrl(width, height, 'business'); }; Faker.Image.cats = function (width, height) { - return image.imageUrl(width, height, 'cats'); + return this.imageUrl(width, height, 'cats'); }; Faker.Image.city = function (width, height) { - return image.imageUrl(width, height, 'city'); + return this.imageUrl(width, height, 'city'); }; Faker.Image.food = function (width, height) { - return image.imageUrl(width, height, 'food'); + return this.imageUrl(width, height, 'food'); }; Faker.Image.nightlife = function (width, height) { - return image.imageUrl(width, height, 'nightlife'); + return this.imageUrl(width, height, 'nightlife'); }; Faker.Image.fashion = function (width, height) { - return image.imageUrl(width, height, 'fashion'); + return this.imageUrl(width, height, 'fashion'); }; Faker.Image.people = function (width, height) { - return image.imageUrl(width, height, 'people'); + return this.imageUrl(width, height, 'people'); }; Faker.Image.nature = function (width, height) { - return image.imageUrl(width, height, 'nature'); + return this.imageUrl(width, height, 'nature'); }; Faker.Image.sports = function (width, height) { - return image.imageUrl(width, height, 'sports'); + return this.imageUrl(width, height, 'sports'); }; Faker.Image.technics = function (width, height) { - return image.imageUrl(width, height, 'technics'); + return this.imageUrl(width, height, 'technics'); }; Faker.Image.transport = function (width, height) { - return image.imageUrl(width, height, 'transport'); + return this.imageUrl(width, height, 'transport'); }; Faker.Lorem = {}; diff --git a/MinFaker.js b/MinFaker.js index 657d1dc2d..4d0687ae0 100644 --- a/MinFaker.js +++ b/MinFaker.js @@ -5,9 +5,9 @@ a.random.last_name()+" "+a.random.street_suffix();break;case 1:c=a.random.first_ function(){return g.replaceSymbolWithNumber(a.random.phone_formats())};a.PhoneNumber.phoneNumberFormat=function(a){return g.replaceSymbolWithNumber(d.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 c;switch(a.random.number(2)){case 0:c=a.random.first_name();break;case 1:c=a.random.first_name()+a.random.array_element([".","_"])+a.random.last_name()}return c};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=[],b=0;4>b;b++)a[b]=(254*Math.random()+1).toFixed(0);return a.join(".")};a.Internet.color=function(c,b,e){b=Math.floor((a.random.number(256)+c)/2);e=Math.floor((a.random.number(256)+c)/2);c=Math.floor((a.random.number(256)+c)/2);return"#"+b.toString(16)+e.toString(16)+c.toString(16)};a.Company={};a.Company.suffixes=function(){return["Inc", "and Sons","LLC","Group","and Daughters"]};a.Company.companyName=function(c){switch(c?c: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.Image={};a.Image.avatar=function(){return a.random.avatar_uri()};a.Image.imageUrl=function(a,b,e){a="http://lorempixel.com/"+(a||640)+"/"+(b||480);"undefined"!==typeof e&&(a+="/"+e);return a};a.Image.abstractImage=function(a,b){return image.imageUrl(a,b,"abstract")};a.Image.animals=function(a,b){return image.imageUrl(a,b,"animals")};a.Image.business=function(a,b){return image.imageUrl(a, -b,"business")};a.Image.cats=function(a,b){return image.imageUrl(a,b,"cats")};a.Image.city=function(a,b){return image.imageUrl(a,b,"city")};a.Image.food=function(a,b){return image.imageUrl(a,b,"food")};a.Image.nightlife=function(a,b){return image.imageUrl(a,b,"nightlife")};a.Image.fashion=function(a,b){return image.imageUrl(a,b,"fashion")};a.Image.people=function(a,b){return image.imageUrl(a,b,"people")};a.Image.nature=function(a,b){return image.imageUrl(a,b,"nature")};a.Image.sports=function(a,b){return image.imageUrl(a, -b,"sports")};a.Image.technics=function(a,b){return image.imageUrl(a,b,"technics")};a.Image.transport=function(a,b){return image.imageUrl(a,b,"transport")};a.Lorem={};a.Lorem.words=function(a){"undefined"==typeof a&&(a=3);return g.shuffle(d.lorem).slice(0,a)};a.Lorem.sentence=function(c,b){"undefined"==typeof c&&(c=3);return this.words(c+a.random.number(7)).join(" ")};a.Lorem.sentences=function(a){"undefined"==typeof a&&(a=3);var b=[];for(a;0 -Copyright (c) 2010 Matthew Bergman & Marak Squires http://github.com/marak/Faker.js/ +Copyright (c) 2014 Matthew Bergman & Marak Squires http://github.com/marak/Faker.js/
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the diff --git a/examples/js/Faker.js b/examples/js/Faker.js index 10611600e..3c3226c8e 100644 --- a/examples/js/Faker.js +++ b/examples/js/Faker.js @@ -17,7 +17,7 @@ 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. */ -/*************** AUTOGENERATED @ 1399264537739 *************** +/*************** AUTOGENERATED @ 1399266332795 *************** WARNING: THIS FILE WAS AUTOGENERATED BY THE FAKER BUILD SCRIPT MODIFYING THIS FILE IS FINE, BUT YOU REALLY SHOULD BE MODIFYING THE LIBRARY DIRECTLY AND REGENERATING THIS FILE USING BUILD.js!!!! @@ -260,55 +260,55 @@ Faker.Image.imageUrl = function (width, height, category) { }; Faker.Image.abstractImage = function (width, height) { - return image.imageUrl(width, height, 'abstract'); + return this.imageUrl(width, height, 'abstract'); }; Faker.Image.animals = function (width, height) { - return image.imageUrl(width, height, 'animals'); + return this.imageUrl(width, height, 'animals'); }; Faker.Image.business = function (width, height) { - return image.imageUrl(width, height, 'business'); + return this.imageUrl(width, height, 'business'); }; Faker.Image.cats = function (width, height) { - return image.imageUrl(width, height, 'cats'); + return this.imageUrl(width, height, 'cats'); }; Faker.Image.city = function (width, height) { - return image.imageUrl(width, height, 'city'); + return this.imageUrl(width, height, 'city'); }; Faker.Image.food = function (width, height) { - return image.imageUrl(width, height, 'food'); + return this.imageUrl(width, height, 'food'); }; Faker.Image.nightlife = function (width, height) { - return image.imageUrl(width, height, 'nightlife'); + return this.imageUrl(width, height, 'nightlife'); }; Faker.Image.fashion = function (width, height) { - return image.imageUrl(width, height, 'fashion'); + return this.imageUrl(width, height, 'fashion'); }; Faker.Image.people = function (width, height) { - return image.imageUrl(width, height, 'people'); + return this.imageUrl(width, height, 'people'); }; Faker.Image.nature = function (width, height) { - return image.imageUrl(width, height, 'nature'); + return this.imageUrl(width, height, 'nature'); }; Faker.Image.sports = function (width, height) { - return image.imageUrl(width, height, 'sports'); + return this.imageUrl(width, height, 'sports'); }; Faker.Image.technics = function (width, height) { - return image.imageUrl(width, height, 'technics'); + return this.imageUrl(width, height, 'technics'); }; Faker.Image.transport = function (width, height) { - return image.imageUrl(width, height, 'transport'); + return this.imageUrl(width, height, 'transport'); }; Faker.Lorem = {};