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

validate-password

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

validate-password - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

2

package.json
{
"name": "validate-password",
"version": "1.0.0",
"version": "1.0.1",
"description": "Strengthen your user's passwords",

@@ -5,0 +5,0 @@ "author": "Mike DeWitt <mdewitt07@gmail.com>",

@@ -1,5 +0,7 @@

var extend = require('lodash/fp/extend');
module.exports = ValidatePassword;
/*
** Main ValidatePassword method
*/
function ValidatePassword(options) {

@@ -9,2 +11,34 @@ this.options = options;

/*
** Polyfill for Object.assign
** See: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/assign#Polyfill
*/
if (typeof Object.assign != 'function') {
(function () {
Object.assign = function (target) {
'use strict';
if (target === undefined || target === null) {
throw new TypeError('Cannot convert undefined or null to object');
}
var output = Object(target);
for (var index = 1; index < arguments.length; index++) {
var source = arguments[index];
if (source !== undefined && source !== null) {
for (var nextKey in source) {
if (source.hasOwnProperty(nextKey)) {
output[nextKey] = source[nextKey];
}
}
}
}
return output;
};
})();
}
/*
** Main checkPassword method
*/
ValidatePassword.prototype.checkPassword = function(password, forbiddenStrings) {

@@ -25,5 +59,4 @@ var validationData = {

var options = extend(defaultOptions, this.options);
var options = Object.assign(defaultOptions, this.options);
var checkForbiddenStringsData;
var minLengthValidationMessage;

@@ -70,3 +103,5 @@ if (!password) {

//Helper Methods
/*
** Helper methods
*/

@@ -73,0 +108,0 @@ function hasLowerCase(pw) {

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

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

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