Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

Faker

Package Overview
Dependencies
Maintainers
2
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

Faker - npm Package Compare versions

Comparing version 0.7.0 to 0.7.1

7

BUILD/BUILD.js

@@ -8,3 +8,3 @@ #!/usr/bin/env node

var package = require('../package.json');
var code = '';

@@ -15,6 +15,7 @@ var docs = {};

docs.API = '';
docs.copyrightYear = new Date().getFullYear();
// read in the the main.js file as our main boilerplate code
code += fs.readFileSync('./main.js', encoding = 'utf8');
code = M.Mustache.to_html(code, {"today": new Date().getTime()});
code = M.Mustache.to_html(code, {'today': new Date().getTime(), 'version': package.version});

@@ -87,3 +88,3 @@ docs.main += fs.readFileSync('./docs.js', encoding = 'utf8');

var docOutput = M.Mustache.to_html(docs.main, {"API": docs.API});
var docOutput = M.Mustache.to_html(docs.main, {"API": docs.API, "copyrightYear": docs.copyrightYear});

@@ -90,0 +91,0 @@ // generate some samples sets (move this code to another section)

@@ -43,3 +43,3 @@ # Faker.js - generate massive amounts of fake data in the browser and node.js

<br/>
Copyright (c) 2010 Matthew Bergman & Marak Squires http://github.com/marak/Faker.js/
Copyright (c) {{copyrightYear}} Matthew Bergman & Marak Squires http://github.com/marak/Faker.js/
<br/>

@@ -46,0 +46,0 @@ Permission is hereby granted, free of charge, to any person obtaining

@@ -60,2 +60,2 @@ /*

Faker.version = "0.5.5";
Faker.version = "{{version}}";

@@ -18,39 +18,39 @@ var Faker = require('../index');

abstractImage: function (width, height) {
return image.imageUrl(width, height, 'abstract');
return this.imageUrl(width, height, 'abstract');
},
animals: function (width, height) {
return image.imageUrl(width, height, 'animals');
return this.imageUrl(width, height, 'animals');
},
business: function (width, height) {
return image.imageUrl(width, height, 'business');
return this.imageUrl(width, height, 'business');
},
cats: function (width, height) {
return image.imageUrl(width, height, 'cats');
return this.imageUrl(width, height, 'cats');
},
city: function (width, height) {
return image.imageUrl(width, height, 'city');
return this.imageUrl(width, height, 'city');
},
food: function (width, height) {
return image.imageUrl(width, height, 'food');
return this.imageUrl(width, height, 'food');
},
nightlife: function (width, height) {
return image.imageUrl(width, height, 'nightlife');
return this.imageUrl(width, height, 'nightlife');
},
fashion: function (width, height) {
return image.imageUrl(width, height, 'fashion');
return this.imageUrl(width, height, 'fashion');
},
people: function (width, height) {
return image.imageUrl(width, height, 'people');
return this.imageUrl(width, height, 'people');
},
nature: function (width, height) {
return image.imageUrl(width, height, 'nature');
return this.imageUrl(width, height, 'nature');
},
sports: function (width, height) {
return image.imageUrl(width, height, 'sports');
return this.imageUrl(width, height, 'sports');
},
technics: function (width, height) {
return image.imageUrl(width, height, 'technics');
return this.imageUrl(width, height, 'technics');
},
transport: function (width, height) {
return image.imageUrl(width, height, 'transport');
return this.imageUrl(width, height, 'transport');
}

@@ -57,0 +57,0 @@ };

{
"name": "Faker",
"description": "Generate massive amounts of fake contextual data",
"version": "0.7.0",
"version": "0.7.1",
"contributors": [

@@ -6,0 +6,0 @@ "Marak Squires <marak.squires@gmail.com>",

@@ -27,3 +27,3 @@ # Faker.js - generate massive amounts of fake data in the browser and node.js

<br/>
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/
<br/>

@@ -30,0 +30,0 @@ Permission is hereby granted, free of charge, to any person obtaining

@@ -19,3 +19,3 @@ if (typeof module !== 'undefined') {

});
it("returns a random image url in an abstract category", function () {
it("returns a random image url for a specified category", function () {
var imageUrl = Faker.Image.imageUrl(100, 100, 'abstract');

@@ -25,16 +25,86 @@

});
it("returns a random image url in a category via proxy methods", function () {
});
describe("avatar()", function () {
it("return a random avatar from UIFaces", function () {
assert.notEqual(-1, Faker.Image.avatar().indexOf('s3.amazonaws.com/uifaces/faces'));
})
});
describe("abstractImage()", function () {
it("returns a random abstract image url", function () {
var abstract = Faker.Image.abstractImage();
assert.equal(abstract, 'http://lorempixel.com/640/480/abstract');
});
});
describe("animals()", function () {
it("returns a random animals image url", function () {
var animals = Faker.Image.animals();
assert.equal(animals, 'http://lorempixel.com/640/480/animals');
});
});
describe("business()", function () {
it("returns a random business image url", function () {
var business = Faker.Image.business();
assert.equal(business, 'http://lorempixel.com/640/480/business');
});
});
describe("cats()", function () {
it("returns a random cats image url", function () {
var cats = Faker.Image.cats();
assert.equal(cats, 'http://lorempixel.com/640/480/cats');
});
});
describe("city()", function () {
it("returns a random city image url", function () {
var city = Faker.Image.city();
assert.equal(city, 'http://lorempixel.com/640/480/city');
});
});
describe("food()", function () {
it("returns a random food image url", function () {
var food = Faker.Image.food();
assert.equal(food, 'http://lorempixel.com/640/480/food');
});
});
describe("nightlife()", function () {
it("returns a random nightlife image url", function () {
var nightlife = Faker.Image.nightlife();
assert.equal(nightlife, 'http://lorempixel.com/640/480/nightlife');
var city = Faker.Image.city();
assert.equal(city, 'http://lorempixel.com/640/480/city');
});
});
describe("fashion()", function () {
it("returns a random fashion image url", function () {
var fashion = Faker.Image.fashion();
assert.equal(fashion, 'http://lorempixel.com/640/480/fashion');
});
it("return a random avatar from UIFaces", function () {
assert.notEqual(-1, Faker.Image.avatar().indexOf('s3.amazonaws.com/uifaces/faces'));
})
});
describe("people()", function () {
it("returns a random people image url", function () {
var people = Faker.Image.people();
assert.equal(people, 'http://lorempixel.com/640/480/people');
});
});
describe("nature()", function () {
it("returns a random nature image url", function () {
var nature = Faker.Image.nature();
assert.equal(nature, 'http://lorempixel.com/640/480/nature');
});
});
describe("sports()", function () {
it("returns a random sports image url", function () {
var sports = Faker.Image.sports();
assert.equal(sports, 'http://lorempixel.com/640/480/sports');
});
});
describe("technics()", function () {
it("returns a random technics image url", function () {
var technics = Faker.Image.technics();
assert.equal(technics, 'http://lorempixel.com/640/480/technics');
});
});
describe("transport()", function () {
it("returns a random transport image url", function () {
var transport = Faker.Image.transport();
assert.equal(transport, 'http://lorempixel.com/640/480/transport');
});
});
});

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc