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

stimulus-password-visibility

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

stimulus-password-visibility - npm Package Compare versions

Comparing version 1.1.1 to 2.0.0

8

CHANGELOG.md

@@ -9,2 +9,10 @@ # Changelog

## [2.0.0] - 2022-01-06
### Chore
- **Breaking** Upgrading Stimulus to `3.x` and change namespace from `stimulus` to `@hotwired/stimulus`.
- Upgrading dependencies
- Upgrading Node to 16.13.1.
## [1.1.1] - 2021-08-23

@@ -11,0 +19,0 @@

17

dist/stimulus-password-visibility.es.js

@@ -1,1 +0,16 @@

import{Controller as s}from"stimulus";class t extends s{connect(){this.hidden="password"===this.inputTarget.type,this.class=this.hasHiddenClass?this.hiddenClass:"hidden"}toggle(s){s.preventDefault(),this.inputTarget.type=this.hidden?"text":"password",this.hidden=!this.hidden,this.iconTargets.forEach((s=>s.classList.toggle(this.class)))}}t.targets=["input","icon"],t.classes=["hidden"];export{t as default};
import { Controller } from "@hotwired/stimulus";
class src_default extends Controller {
connect() {
this.hidden = this.inputTarget.type === "password";
this.class = this.hasHiddenClass ? this.hiddenClass : "hidden";
}
toggle(e) {
e.preventDefault();
this.inputTarget.type = this.hidden ? "text" : "password";
this.hidden = !this.hidden;
this.iconTargets.forEach((icon) => icon.classList.toggle(this.class));
}
}
src_default.targets = ["input", "icon"];
src_default.classes = ["hidden"];
export { src_default as default };

2

dist/stimulus-password-visibility.umd.js

@@ -1,1 +0,1 @@

!function(s,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("stimulus")):"function"==typeof define&&define.amd?define(["stimulus"],t):(s="undefined"!=typeof globalThis?globalThis:s||self)["stimulus-password-visibility"]=t(s.Stimulus)}(this,(function(s){"use strict";class t extends s.Controller{connect(){this.hidden="password"===this.inputTarget.type,this.class=this.hasHiddenClass?this.hiddenClass:"hidden"}toggle(s){s.preventDefault(),this.inputTarget.type=this.hidden?"text":"password",this.hidden=!this.hidden,this.iconTargets.forEach((s=>s.classList.toggle(this.class)))}}return t.targets=["input","icon"],t.classes=["hidden"],t}));
(function(e,s){typeof exports=="object"&&typeof module!="undefined"?module.exports=s(require("@hotwired/stimulus")):typeof define=="function"&&define.amd?define(["@hotwired/stimulus"],s):(e=typeof globalThis!="undefined"?globalThis:e||self,e["stimulus-password-visibility"]=s(e.Stimulus))})(this,function(e){"use strict";class s extends e.Controller{connect(){this.hidden=this.inputTarget.type==="password",this.class=this.hasHiddenClass?this.hiddenClass:"hidden"}toggle(t){t.preventDefault(),this.inputTarget.type=this.hidden?"text":"password",this.hidden=!this.hidden,this.iconTargets.forEach(i=>i.classList.toggle(this.class))}}return s.targets=["input","icon"],s.classes=["hidden"],s});
{
"name": "stimulus-password-visibility",
"version": "1.1.1",
"version": "2.0.0",
"description": "A Stimulus controller to change a password input visibility.",

@@ -33,19 +33,19 @@ "keywords": [

"devDependencies": {
"@babel/core": "^7.14.0",
"@babel/core": "^7.16.7",
"@babel/polyfill": "^7.12.1",
"@babel/preset-env": "^7.14.1",
"@babel/preset-typescript": "^7.13.0",
"@testing-library/dom": "^8.1.0",
"@types/jest": "^27.0.1",
"babel-jest": "^27.0.6",
"jest": "^27.0.6",
"@babel/preset-env": "^7.16.7",
"@babel/preset-typescript": "^7.16.7",
"@hotwired/stimulus": "^3.0.1",
"@testing-library/dom": "^8.11.1",
"@types/jest": "^27.4.0",
"babel-jest": "^27.4.6",
"jest": "^27.4.7",
"mutationobserver-shim": "^0.3.7",
"np": "^7.5.0",
"np": "^7.6.0",
"prettier-standard": "16.4.1",
"stimulus": "^2.0.0",
"typescript": "^4.2.4",
"vite": "^2.2.4"
"typescript": "^4.5.4",
"vite": "^2.7.10"
},
"peerDependencies": {
"stimulus": "^2.0.0"
"@hotwired/stimulus": "^3.0.1"
},

@@ -52,0 +52,0 @@ "jest": {

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