
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
check-passwords
Advanced tools
Tool for check passwords in form fields using webpack
and pure javascript in the client.
Via npm npm install check-passwords
This tool is make for will used with webpack
as a module.
CheckPasswords
It's the main class and receive as paramater an object of configuration, this object can have the following properties and method.
target
{DOMObject}, This should be the form DOM object and is optional, if is undefined then the form DOM object will be the first form element that exists at body
.passwordFields
{Array}, This should be the array of inputs fields type password and is optional, if is undefined then the inputs will be the first two in form
.onMatch
{Function}, This function is called when the password in the two fields are equals.onDontMatch
{Function}, This function is called when the password in the two fields aren't equals.The method watch
is for listen the event blur in the second field when this change it, after that the functions onMatch
and onDontMatch
are called if the passwords equals or not.
const CheckPasswords = require('check-passwords');
window.onload = function () {
const MyCheckPass = new CheckPasswords({
target: document.getElementById('form'),
passwordFields: [
document.querySelector('.password'),
document.querySelector('.repear-password')
],
onMatch: function () {
// When the passwords are equals.
},
onDontMatch: function () {
// When don't.
}
});
// Call method watch for listen blur event in the second field.
MyCheckPass.watch();
};
You need have installed globaly webpack
and execute npm run test
for test the tool in your browser.
FAQs
A tool for check passwords in form fields
The npm package check-passwords receives a total of 1 weekly downloads. As such, check-passwords popularity was classified as not popular.
We found that check-passwords demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.