Vue plugin that wraps faker.js
npm install vue-fakerYou can install this plugin through NPM
`` cmd `
npm install vue-faker
And then register the plugin with Vue.
` js`
Vue.use(require('vue-faker'));
` js`
Vue.faker().name.firstName()
Or from within a Vue component
` js`
this.$faker().name.firstName()
` js`
...
data() {
return {
name: this.$faker().name.findName(),
email: this.$faker().internet.email(),
company: this.$faker().company.companyName(),
}
},
...
` js``
Vue.use(require('vue-faker'), {locale: 'en_GB'});