@ibiliaze/stringman 3.5.0 → 3.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +5 -5
- package/package.json +2 -2
- package/src/index.ts +5 -5
package/dist/index.js
CHANGED
|
@@ -233,15 +233,15 @@ exports.getTicketId = getTicketId;
|
|
|
233
233
|
const invalidPw = (password, passwordLength = 8) => {
|
|
234
234
|
try {
|
|
235
235
|
if (password.length < passwordLength)
|
|
236
|
-
`Password must be at least ${passwordLength} characters`;
|
|
236
|
+
return `Password must be at least ${passwordLength} characters`;
|
|
237
237
|
if (!/[A-Z]/.test(password))
|
|
238
|
-
'Password must contain an uppercase letter';
|
|
238
|
+
return 'Password must contain an uppercase letter';
|
|
239
239
|
if (!/[a-z]/.test(password))
|
|
240
|
-
'Password must contain a lowercase letter';
|
|
240
|
+
return 'Password must contain a lowercase letter';
|
|
241
241
|
if (!/[0-9]/.test(password))
|
|
242
|
-
'Password must contain a number';
|
|
242
|
+
return 'Password must contain a number';
|
|
243
243
|
if (!/[!@#$%^&*(),.?":{}|<>]/.test(password))
|
|
244
|
-
'Password must contain a special character';
|
|
244
|
+
return 'Password must contain a special character';
|
|
245
245
|
}
|
|
246
246
|
catch {
|
|
247
247
|
return 'Failed to validate password';
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ibiliaze/stringman",
|
|
3
|
-
"version": "3.5.
|
|
3
|
+
"version": "3.5.1",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
7
7
|
"scripts": {
|
|
8
8
|
"build": "tsc",
|
|
9
9
|
"pub": "npm publish --access public",
|
|
10
|
-
"git": "git add .; git commit -m 'changes'; git tag -a v3.5.
|
|
10
|
+
"git": "git add .; git commit -m 'changes'; git tag -a v3.5.1 -m 'v3.5.1'; git push origin v3.5.1; git push",
|
|
11
11
|
"push": "npm run build; npm run git; npm run pub"
|
|
12
12
|
},
|
|
13
13
|
"author": "Ibi Hasanli",
|
package/src/index.ts
CHANGED
|
@@ -240,11 +240,11 @@ export const getTicketId = ({
|
|
|
240
240
|
|
|
241
241
|
export const invalidPw = (password: string, passwordLength: number = 8): string | void => {
|
|
242
242
|
try {
|
|
243
|
-
if (password.length < passwordLength) `Password must be at least ${passwordLength} characters`;
|
|
244
|
-
if (!/[A-Z]/.test(password)) 'Password must contain an uppercase letter';
|
|
245
|
-
if (!/[a-z]/.test(password)) 'Password must contain a lowercase letter';
|
|
246
|
-
if (!/[0-9]/.test(password)) 'Password must contain a number';
|
|
247
|
-
if (!/[!@#$%^&*(),.?":{}|<>]/.test(password)) 'Password must contain a special character';
|
|
243
|
+
if (password.length < passwordLength) return `Password must be at least ${passwordLength} characters`;
|
|
244
|
+
if (!/[A-Z]/.test(password)) return 'Password must contain an uppercase letter';
|
|
245
|
+
if (!/[a-z]/.test(password)) return 'Password must contain a lowercase letter';
|
|
246
|
+
if (!/[0-9]/.test(password)) return 'Password must contain a number';
|
|
247
|
+
if (!/[!@#$%^&*(),.?":{}|<>]/.test(password)) return 'Password must contain a special character';
|
|
248
248
|
} catch {
|
|
249
249
|
return 'Failed to validate password';
|
|
250
250
|
}
|