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

vue-faker

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vue-faker

Vue plugin that wraps faker.js

  • 3.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2K
increased by31.2%
Maintainers
1
Weekly downloads
 
Created
Source

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'});

Keywords

FAQs

Package last updated on 09 Nov 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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