Comparing version 1.1.13 to 1.1.14
{ | ||
"name": "6pp", | ||
"version": "1.1.13", | ||
"version": "1.1.14", | ||
"description": "", | ||
"main": "./dist/bundle.js", | ||
"types": "./index.d.ts", | ||
"main": "dist/index.js", | ||
"types": "dist/index.d.ts", | ||
"type": "module", | ||
"scripts": { | ||
"build": "webpack" | ||
"build": "npx rollup -c" | ||
}, | ||
@@ -14,13 +15,9 @@ "keywords": [], | ||
"devDependencies": { | ||
"@babel/core": "^7.23.7", | ||
"@babel/preset-env": "^7.23.8", | ||
"@babel/preset-react": "^7.23.3", | ||
"@babel/preset-typescript": "^7.23.3", | ||
"@rollup/plugin-babel": "^6.0.4", | ||
"@rollup/plugin-typescript": "^11.1.6", | ||
"@types/react": "^18.2.48", | ||
"babel-loader": "^9.1.3", | ||
"react": "^18.2.0", | ||
"react-dom": "^18.2.0", | ||
"typescript": "^5.3.3", | ||
"webpack": "^5.89.0", | ||
"webpack-cli": "^5.1.4" | ||
"rollup": "^4.12.0", | ||
"tslib": "^2.6.2" | ||
}, | ||
@@ -27,0 +24,0 @@ "peerDependencies": { |
@@ -10,3 +10,8 @@ export * from "./hooks/fetching"; | ||
export * from "./components//Cursors"; | ||
export * from "./types"; | ||
export * from "./lib/validators"; | ||
export { | ||
PaginationButtonType, | ||
PageStepperButtonType, | ||
CarouselButtonType, | ||
} from "./types/types"; |
@@ -1,17 +0,2 @@ | ||
import { | ||
isIncludeNumberType, | ||
isIncludeSpecialCharType, | ||
isIncludeCapitalLetterType, | ||
isIncludeLowercaseLetterType, | ||
isValidEmailType, | ||
isValidUsernameType, | ||
isValidUrlType, | ||
isValidPhoneNumberType, | ||
isValidDateType, | ||
isValidTimeType, | ||
isValidDateTimeType, | ||
isDateBetweenType, | ||
} from "../types"; | ||
const isIncludeNumber: isIncludeNumberType = (password: string) => { | ||
const isIncludeNumber = (password: string) => { | ||
const regex = /\d/; // This regular expression matches any digit (0-9) | ||
@@ -21,3 +6,3 @@ return regex.test(password); // This will return true if the password includes a number, and false otherwise | ||
const isIncludeSpecialChar: isIncludeSpecialCharType = (password: string) => { | ||
const isIncludeSpecialChar = (password: string) => { | ||
const specialCharRegex = /[ `!@#$%^&*()_+\-=\[\]{};':"\\|,.<>\/?~]/; // This regular expression matches any special character | ||
@@ -27,5 +12,3 @@ return specialCharRegex.test(password); // This will return true if the password includes a special character, and false otherwise | ||
const isIncludeCapitalLetter: isIncludeCapitalLetterType = ( | ||
password: string | ||
) => { | ||
const isIncludeCapitalLetter = (password: string) => { | ||
const capitalLetterRegex = /[A-Z]/; // This regular expression matches any capital letter (A-Z) | ||
@@ -35,5 +18,3 @@ return capitalLetterRegex.test(password); // This will return true if the password includes a capital letter, and false otherwise | ||
const isIncludeLowercaseLetter: isIncludeLowercaseLetterType = ( | ||
password: string | ||
) => { | ||
const isIncludeLowercaseLetter = (password: string) => { | ||
const lowercaseLetterRegex = /[a-z]/; // This regular expression matches any lowercase letter (a-z) | ||
@@ -43,3 +24,3 @@ return lowercaseLetterRegex.test(password); // This will return true if the password includes a lowercase letter, and false otherwise | ||
const isValidEmail: isValidEmailType = (email: string) => { | ||
const isValidEmail = (email: string) => { | ||
const emailRegex = /\S+@\S+\.\S+/; | ||
@@ -49,3 +30,3 @@ return emailRegex.test(email); | ||
const isValidUsername: isValidUsernameType = (username: string) => { | ||
const isValidUsername = (username: string) => { | ||
const usernameRegex = /^[a-zA-Z0-9]+$/; | ||
@@ -55,3 +36,3 @@ return usernameRegex.test(username); | ||
const isValidUrl: isValidUrlType = (url: string) => { | ||
const isValidUrl = (url: string) => { | ||
try { | ||
@@ -66,3 +47,3 @@ new URL(url); | ||
// 10 digit phone number | ||
const isValidPhoneNumber: isValidPhoneNumberType = (phoneNumber: string) => { | ||
const isValidPhoneNumber = (phoneNumber: string) => { | ||
const regex = /^\d{10}$/; | ||
@@ -73,3 +54,3 @@ return regex.test(phoneNumber); | ||
// YYYY-MM-DD Format | ||
const isValidDate: isValidDateType = (date: string) => { | ||
const isValidDate = (date: string) => { | ||
const regex = /^\d{4}-\d{2}-\d{2}$/; | ||
@@ -80,3 +61,3 @@ return regex.test(date); | ||
// HH:MM Format | ||
const isValidTime: isValidTimeType = (time: string) => { | ||
const isValidTime = (time: string) => { | ||
const regex = /^\d{2}:\d{2}$/; | ||
@@ -87,3 +68,3 @@ return regex.test(time); | ||
// YYYY-MM-DDTHH:MM Format | ||
const isValidDateTime: isValidDateTimeType = (dateTime: string) => { | ||
const isValidDateTime = (dateTime: string) => { | ||
const regex = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}$/; | ||
@@ -93,7 +74,3 @@ return regex.test(dateTime); | ||
const isDateBetween: isDateBetweenType = ( | ||
date: string, | ||
startDate: string, | ||
endDate: string | ||
) => { | ||
const isDateBetween = (date: string, startDate: string, endDate: string) => { | ||
const targetDate = new Date(date); | ||
@@ -100,0 +77,0 @@ const start = new Date(startDate); |
{ | ||
"compilerOptions": { | ||
"target": "es5", | ||
"lib": ["dom", "es2015"], | ||
"lib": ["ES2020", "dom"], | ||
"jsx": "react", | ||
"module": "commonjs", | ||
"moduleResolution": "node", | ||
"esModuleInterop": true, | ||
"allowSyntheticDefaultImports": true, | ||
"forceConsistentCasingInFileNames": true, | ||
"strict": true, | ||
"outDir": "./dist" | ||
"target": "ES2020", | ||
"module": "ESNext", | ||
"declaration": true, | ||
"declarationDir": "dist", | ||
"strict": true | ||
}, | ||
@@ -14,0 +11,0 @@ "include": ["src/**/*.ts", "src/**/*.tsx"], |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
7
39
2585
1
Yes
90395