vue-faker

Vue plugin that wraps faker.js
9,064 14
Install
npm install vue-faker
Latest Version:3.0.0
License:ISC
Last Updated:Nov 9, 2020
Links: GitHub  ·  npm
Maintainer: brockreece

vue-faker

Vue plugin that wraps the node fake data generator, [faker] (https://github.com/marak/Faker.js/).

Installation

You can install this plugin through NPM

npm install vue-faker

And then register the plugin with Vue.

Vue.use(require('vue-faker'));

Usage

You now access the faker library using the following command

Vue.faker().name.firstName()

Or from within a Vue component

this.$faker().name.firstName()
...
data() {
    return {
      name: this.$faker().name.findName(),
      email: this.$faker().internet.email(),
      company: this.$faker().company.companyName(),
    }
},
...

Locale

You can set the loacle globally by passing it through as an option to the plugin

Vue.use(require('vue-faker'), {locale: 'en_GB'});

Related Packages

@21cnfe/onekit-mp-cli

小程序框架开发工具

1,063
duplicate-dependencies-webpack-plugin

webpack plugin to find duplicated dependencies from your bundle

332,104 6
@debut/plugin-report

Report generation for strategy backtesting in debut

4,011 18
@amilochau/core-vue3

Core plugin for vue.js (v3) projects

3,802 0
@lg2/nuxt3-plugin-link-resolver

link resolver plugin fro nuxt3

3,544 0

Version History

Version Released License
3.0.0 ISC
2.0.0 ISC
1.0.1 ISC
1.0.0 ISC