New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@accounts/common

Package Overview
Dependencies
Maintainers
5
Versions
93
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@accounts/common - npm Package Compare versions

Comparing version 0.1.0-beta.10 to 0.1.0-beta.11

9

lib/validators.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var isEmpty = require("lodash/isEmpty");
var trim = require("lodash/trim");
var lodash_1 = require("lodash");
exports.isEmail = function (email) {

@@ -10,7 +9,7 @@ var re = /^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;

exports.validateEmail = function (email) {
var isValid = !isEmpty(trim(email || '')) && exports.isEmail(email);
var isValid = !lodash_1.isEmpty(lodash_1.trim(email || '')) && exports.isEmail(email);
return Boolean(isValid);
};
exports.validatePassword = function (password) {
var isValid = !isEmpty(password);
var isValid = !lodash_1.isEmpty(password);
return isValid;

@@ -20,5 +19,5 @@ };

var usernameRegex = /^[a-zA-Z][a-zA-Z0-9]*$/;
var isValid = username && !isEmpty(trim(username)) && usernameRegex.test(username);
var isValid = username && !lodash_1.isEmpty(lodash_1.trim(username)) && usernameRegex.test(username);
return Boolean(isValid);
};
//# sourceMappingURL=validators.js.map
{
"name": "@accounts/common",
"version": "0.1.0-beta.10",
"version": "0.1.0-beta.11",
"description": "Fullstack authentication and accounts-management",

@@ -32,8 +32,7 @@ "main": "lib/index.js",

"js"
],
"mapCoverage": true
]
},
"repository": {
"type": "git",
"url": "https://github.com/js-accounts/accounts/tree/master/packages/common"
"url": "https://github.com/accounts-js/accounts/tree/master/packages/common"
},

@@ -53,2 +52,6 @@ "keywords": [

"devDependencies": {
"@types/jest": "22.2.3",
"@types/lodash": "4.14.108",
"@types/node": "9.6.15",
"jest": "22.4.3",
"localstorage-polyfill": "1.0.1",

@@ -58,4 +61,4 @@ "regenerator-runtime": "0.11.1"

"dependencies": {
"lodash": "^4.16.4"
"lodash": "^4.17.10"
}
}

Sorry, the diff of this file is not supported yet

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