Ember Faker
Ember addon wrapper for Faker.js.
Installation
ember install:addon ember-faker
Usage
Import the faker module with import faker from 'faker'
. Then you can use it as a default
value for dummy data:
import faker from 'faker';
export default DS.Model.extend({
firstName: DS.attr('string', {
defaultValue: function() {
return faker.name.firstName();
}
})
});
Or manually set attributes for tests or prototypes:
import faker from 'faker';
user.set('firstName', faker.name.firstName());
user.set('lastName', faker.name.lastName());
Development
Installation
git clone
this repositorynpm install
bower install
Running
Running Tests
ember test
ember test --server
Building
For more information on using ember-cli, visit http://www.ember-cli.com/.
License
MIT
Contributing
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request
Thanks to the following
Crafted with <3 by John Otander (@4lpine).