FotoVerite / Faker.js

generate massive amounts of fake data in Node.js and the browser
MIT License
229 stars 33 forks source link

Remove reference to `this` #7

Closed simonexmachina closed 10 years ago

simonexmachina commented 10 years ago

Remove reference to this so that Faker.Internet.email and domainName can be used without having to bind the function receiver with Faker.Internet.email.bind(Faker.Internet).

Before:

var factory = require('factory-girl'),
    User = require('src/models/User');
factory.define('User', User, {
  given_name: Faker.Name.firstName,
  surname: Faker.Name.lastName,
  email: Faker.Internet.email.bind(Faker.Internet)
});

After:

var factory = require('factory-girl'),
    User = require('src/models/User');
factory.define('User', User, {
  given_name: Faker.Name.firstName,
  surname: Faker.Name.lastName,
  email: Faker.Internet.email
});
simonexmachina commented 10 years ago

It's not clear how to run the build step, so I haven't done anything with that.

simonexmachina commented 10 years ago

Closing this PR, not sure why I forked this repo rather than Marak's