vue3-password-generate

0.4.0 • Public • Published

vue3-password-generate

A Vue.js 3 plugin for generating random passwords with customizable options.

Installation

You can install the package using npm or yarn:

npm install vue3-password-generate
# or
yarn add vue3-password-generate

Template

<template>
  <div>
    <!-- Include the PasswordGenerator component -->
    <PasswordGenerator />
    
    <!-- Button to generate and log a password with default options -->
    <button @click="generateDefaultPassword">Generate Default Password</button>
    
    <!-- Button to generate and log a password with custom options -->
    <button @click="generateCustomPassword">Generate Custom Password</button>
  </div>
</template>

Script

<script>
import { PasswordGenerator } from "vue3-password-generate";

export default {
  components: {
    PasswordGenerator,
  },
  methods: {
    generateDefaultPassword() {
      // Default options
      const password = this.$generatePassword();
      console.log("Default Password:", password);
    },
    generateCustomPassword() {
      // Custom options
      const password = this.$generatePassword({
        includeUppercase: true,
        includeNumbers: true,
        includeSymbols: false,
        passwordLength: 28,
      });
      console.log("Custom Password:", password);
    },
  },
};
</script>

Contributing

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request :D

Author

vue-internet-checker © Harsh Mendapara, Released under the MIT License.
Authored and maintained by Harsh Mendapara with help from contributors (list).

GitHub @Harsh Mendapara

Gmail @Harsh Mendapara

Linkedin @Harsh Mendapara

Readme

Keywords

none

Package Sidebar

Install

npm i vue3-password-generate

Weekly Downloads

1

Version

0.4.0

License

none

Unpacked Size

13.4 kB

Total Files

18

Last publish

Collaborators

  • harsh_patel