Socket
Socket
Sign inDemoInstall

ts-password-check

Package Overview
Dependencies
0
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.0.0 to 2.0.1

lib/constants/criteria.d.ts

10

lib/constants/defaultConfig.d.ts

@@ -1,9 +0,3 @@

declare const defaultConfig: {
lowercase: boolean;
uppercase: boolean;
digits: boolean;
specialChars: boolean;
minLength: number;
};
export type Config = typeof defaultConfig;
import { DefaultConfig } from "../types";
declare const defaultConfig: DefaultConfig;
export default defaultConfig;

12

lib/getPasswordStrength.d.ts

@@ -1,11 +0,3 @@

declare function getPasswordStrength(password: string, config?: {
lowercase: boolean;
uppercase: boolean;
digits: boolean;
specialChars: boolean;
minLength: number;
}): {
messages: string[];
strength: string;
};
import type { Result } from "./types";
declare function getPasswordStrength(password: string, config?: import("./types").DefaultConfig): Result;
export default getPasswordStrength;
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const defaultConfig_1 = require("./constants/defaultConfig");
const criteria_1 = require("./criteria");
const criteria_1 = require("./constants/criteria");
const getThreshold_1 = require("./utils/getThreshold");

@@ -10,2 +10,3 @@ function getPasswordStrength(password, config = defaultConfig_1.default) {

for (const [_, value] of Object.entries(criteria_1.default)) {
// used as casting to prevent error
const key = _;

@@ -12,0 +13,0 @@ if (config[key]) {

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

import getPasswordStrength from "./getPasswordStrength";
export default getPasswordStrength;
export { default as getPasswordStrength } from "./getPasswordStrength";
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const getPasswordStrength_1 = require("./getPasswordStrength");
exports.default = getPasswordStrength_1.default;
exports.getPasswordStrength = void 0;
var getPasswordStrength_1 = require("./getPasswordStrength");
Object.defineProperty(exports, "getPasswordStrength", { enumerable: true, get: function () { return getPasswordStrength_1.default; } });

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

import { Config } from "../constants/defaultConfig";
declare const getThreshold: (config: Config) => number;
import { DefaultConfig } from "../types";
declare const getThreshold: (config: DefaultConfig) => number;
export default getThreshold;
{
"name": "ts-password-check",
"version": "2.0.0",
"version": "2.0.1",
"description": "Check the strength of the password inputed and returns what needs to be updated in the password for that to be more strong.",

@@ -5,0 +5,0 @@ "scripts": {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc