@carecard/validate 1.0.1 → 2.0.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/package.json CHANGED
@@ -1,49 +1,23 @@
1
1
  {
2
2
  "name": "@carecard/validate",
3
- "version": "1.0.1",
4
- "private": false,
5
- "description": "Validate functions",
6
- "license": "ISC",
7
- "author": "PK Singh",
3
+ "version": "2.0.1",
8
4
  "repository": {
9
5
  "type": "git",
10
- "url": "git+https:github.com/CareCard-ca/pkg-validate.git"
11
- },
12
- "type": "module",
13
- "publishConfig": {
14
- "access": "public"
6
+ "url": "git+https://github.com/CareCard-ca/pkg-validate.git"
15
7
  },
16
- "main": "./dist/cjs/index.cjs",
17
- "module": "./dist/esm/index.js",
18
- "types": "./dist/esm/index.d.ts",
19
- "exports": {
20
- ".": {
21
- "import": "./dist/esm/index.js",
22
- "require": "./dist/cjs/index.cjs",
23
- "types": "./dist/esm/index.d.ts"
24
- }
25
- },
26
- "files": [
27
- "dist"
28
- ],
8
+ "description": "Validate data",
9
+ "main": "index.js",
29
10
  "scripts": {
30
- "build": "npm run build:esm && npm run build:cjs",
31
- "build:esm": "tsc -p tsconfig.esm.json",
32
- "build:cjs": "tsc -p tsconfig.cjs.json && node ./scripts/rename-cjs.js",
33
- "test": "NODE_NO_WARNINGS=1 jest --coverage",
34
- "format": "prettier --write .",
35
- "format:check": "prettier --check .",
36
- "lint": "eslint",
37
- "prepare": "husky"
11
+ "test": "export NODE_ENV=test && mocha --watch --recursive"
38
12
  },
13
+ "keywords": [
14
+ "validate",
15
+ "data"
16
+ ],
17
+ "author": "CareCard team",
18
+ "license": "ISC",
39
19
  "devDependencies": {
40
- "@types/jest": "30.0.0",
41
- "jest": "30.2.0",
42
- "ts-jest": "29.4.6",
43
- "typescript": "5.9.3",
44
- "typescript-eslint": "8.50.1",
45
- "prettier": "3.7.4",
46
- "eslint": "9.39.2",
47
- "husky": "9.1.7"
48
- }
20
+ "mocha": "11.7.5"
21
+ },
22
+ "dependencies": {}
49
23
  }
package/readme.md CHANGED
@@ -1,6 +1,24 @@
1
- # pkg-validate
1
+ #Validate
2
+ ### Functions
2
3
 
3
- This is a template for any package.
4
- It works with js or ts and commonjs and esm.
4
+ All functions return boolean value, false on failure
5
5
 
6
- These are some validation functions.
6
+ - Validates that a string is string of characters
7
+ ```js
8
+ isStringOfCharacters(str)
9
+ ```
10
+
11
+ - Validates that a string is fit for username
12
+ ```js
13
+ isStringOfUsername(str)
14
+ ```
15
+
16
+ - Validates that string is an email
17
+ ```js
18
+ isEmail(email)
19
+ ```
20
+
21
+ - Validates that string is fit for password
22
+ ```js
23
+ isStringOfPassword(password)
24
+ ```