New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

react-password-strength

Package Overview
Dependencies
Maintainers
1
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-password-strength - npm Package Compare versions

Comparing version
2.3.0
to
2.3.1
+2
-2
package.json
{
"name": "react-password-strength",
"version": "2.3.0",
"version": "2.3.1",
"engines": {
"node": "6.11.1"
"node": ">6.11.1"
},

@@ -7,0 +7,0 @@ "description": "A password strength indicator field for use in React projects",

Sorry, the diff of this file is too big to display

<!doctype html>
<html>
<head>
<title>React Password Strength Example</title>
<style media="screen">
body {
background: #e6e6e6;
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}
#example {
background: #fff;
margin: 50px auto 30px;
min-height: 250px;
padding: 45px 75px;
width: 500px;
}
label {
display: inline-block;
margin-bottom: 10px;
}
button {
background: #fff;
border: none;
color: #6e6e6e;
font-size: 16px;
padding: 5px 8px;
margin-top: 10px;
opacity: 1;
transition: opacity 250ms ease-in-out;
}
button:hover,
button:focus {
cursor: pointer;
outline: none;
}
button:disabled {
opacity: 0;
}
</style>
</head>
<body>
<div id="example"></div>
<script src="bundle.js"></script>
</body>
</html>
import React from 'react';
import ReactDOM from 'react-dom';
import ReactPasswordStrength from "../dist/index";
class App extends React.Component {
constructor() {
super();
this.state = {
passLength: 0,
};
}
changeCallback(state) {
this.setState({ passLength: state.password.length });
}
clear() {
this.refs.passComponent.clear();
}
render() {
const inputProps = {
placeholder: "Try a password...",
id: "inputPassword",
autoFocus: true,
};
return (
<div>
<h1>React Password Strength Tool</h1>
<p>Powered by <a href="https://github.com/dropbox/zxcvbn" target="_blank">zxcvbn</a></p>
<ReactPasswordStrength
ref="passComponent"
inputProps={inputProps}
changeCallback={this.changeCallback.bind(this)}
/>
<button
onClick={this.clear.bind(this)}
disabled={this.state.passLength === 0}
>
Clear
</button>
</div>
);
}
}
ReactDOM.render(<App />, document.getElementById("example"));