@prashanttiw/pramana 1.0.0 → 1.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/README.md +5 -5
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -30,7 +30,7 @@ Pramana is a **high-performance, zero-dependency, production-ready validation li
|
|
|
30
30
|
## 📦 Installation
|
|
31
31
|
|
|
32
32
|
```bash
|
|
33
|
-
npm install pramana
|
|
33
|
+
npm install @prashanttiw/pramana
|
|
34
34
|
```
|
|
35
35
|
|
|
36
36
|
### Optional: Zod Support
|
|
@@ -54,7 +54,7 @@ import {
|
|
|
54
54
|
isValidGSTIN,
|
|
55
55
|
isValidIFSC,
|
|
56
56
|
isValidPincode
|
|
57
|
-
} from 'pramana';
|
|
57
|
+
} from '@prashanttiw/pramana';
|
|
58
58
|
|
|
59
59
|
// Aadhaar (12 digits with Verhoeff checksum)
|
|
60
60
|
isValidAadhaar('999999990019'); // true
|
|
@@ -87,7 +87,7 @@ import {
|
|
|
87
87
|
getGSTINInfo,
|
|
88
88
|
getPANInfo,
|
|
89
89
|
getPincodeInfo
|
|
90
|
-
} from 'pramana/validators';
|
|
90
|
+
} from '@prashanttiw/pramana/validators';
|
|
91
91
|
|
|
92
92
|
// Extract state from GSTIN
|
|
93
93
|
const gstin = getGSTINInfo('29ABCDE1234F1Z5');
|
|
@@ -106,7 +106,7 @@ console.log(pincode.region); // "Delhi"
|
|
|
106
106
|
|
|
107
107
|
```typescript
|
|
108
108
|
import { z } from 'zod';
|
|
109
|
-
import { aadhaarSchema, panSchema, gstinSchema } from 'pramana/zod';
|
|
109
|
+
import { aadhaarSchema, panSchema, gstinSchema } from '@prashanttiw/pramana/zod';
|
|
110
110
|
|
|
111
111
|
// Create a schema combining Pramana validators with other fields
|
|
112
112
|
const UserSchema = z.object({
|
|
@@ -263,7 +263,7 @@ if (!result) {
|
|
|
263
263
|
A: Combine with Zod for real-time validation:
|
|
264
264
|
|
|
265
265
|
```typescript
|
|
266
|
-
import { aadhaarSchema } from 'pramana/zod';
|
|
266
|
+
import { aadhaarSchema } from '@prashanttiw/pramana/zod';
|
|
267
267
|
|
|
268
268
|
// In your form handler
|
|
269
269
|
const validationResult = aadhaarSchema.safeParse(userInput);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prashanttiw/pramana",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"description": "High-performance, zero-dependency, algorithmic validation library for the Indian context (Aadhaar, PAN, GSTIN, IFSC, Pincode).",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -51,4 +51,4 @@
|
|
|
51
51
|
"optional": true
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
|
-
}
|
|
54
|
+
}
|