npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

vue-password-toggle

v1.3.3

Published

A simple lightweight component to show and hide the password input.

Downloads

327

Readme

vue-password-toggle

A simple lightweight component to show and hide the password input.

Demo

Alt Text

Setup

Business as usual by running

npm i vue-password-toggle 

and integrating it directly into your .vue file:

<script>
  import { PasswordToggle } from 'vue-password-toggle'
  import 'vue-password-toggle/dist/style.css'
</script>

Current recommendation is overwriting the default keyboard enter behaviour by using the integrated emit option and use a vue.js two way data binding.

<template>
  <PasswordToggle 
  v-model:password="password" 
  @keydownEnter="doLogin($event)"/>
</template>

Validation

Validation example

There's no default to able to login in without validation showing up. The result of the validation is transported with a passwordValid emit to the parent. The rest of the options are:

| Parameter | Type | Required | | :---------------- | :------: | ----: | | minPasswordLength | Number | No | | minOneLowerLetter | Boolean | No | | minOneUpperLetter | Boolean | No | | minOneNumber | Boolean | No | | minOneSpecialCharacter | Boolean | No |

and can be added like this.

<template>
  <PasswordToggle 
  v-model:password="password" 
  @keydownEnter="doLogin($event)" 
  @passwordValid="this.passwordValid = $event" 
  :minOneUpperLetter="true" 
  :minPasswordLength="10"/>
</template>

Example Code

Full working code example based on the vue.js generated template app included in the repository.

npm i 
npm run dev

Contributions

Any kind of requests, bugs, and so on and so forth, write a ticket.

Status

  • [x] Configure build process so dependency can be used
  • [x] Write proper docu
  • [x] Add validation of password
  • [ ] Clean out code
  • [ ] Remove unused dependencies
  • [ ] Add color options
  • [ ] Set preventDefault behaviour as mandatory
  • [ ] Have fun at riversurfing
  • [ ] Fry super tasty rice with shrimps
  • [ ] Save the world

Credits

  • If you made it this far in reading this doc, you deserve a laugh or two ;)
  • Thank you for being, Vue.js!
  • You make this look good, Pico.css ^^
  • My icons would look like crazy doodles from a 4 year old without FontAwesome...
  • The boring school system and games such as CS1.6, Warcraft III, Starcraft to inspire me to become a software engineer
  • My Mom and Dad for bringing me into this world, and my imaginary girlfried for her love and support
  • The Universe for creating such a wonderful planet

License

Thank you for not reading MIT!