num-parity-core 1.0.0 โ†’ 1.1.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 ADDED
@@ -0,0 +1,87 @@
1
+ # โšก num-parity-core
2
+
3
+ > A minimal, fast and reliable Node.js utility to detect number parity (even or odd).
4
+
5
+ ---
6
+
7
+ ## ๐Ÿš€ Why num-parity-core?
8
+
9
+ Because number validation should be instant, predictable, and dependency-free.
10
+
11
+ No frameworks. No noise. Just logic.
12
+
13
+ ---
14
+
15
+ ## ๐Ÿ“ฆ Installation
16
+
17
+ ```bash
18
+ npm install num-parity-core
19
+
20
+ ๐Ÿง  **Usage**
21
+ const { isEven, parity } = require("num-parity-core");
22
+
23
+ // Boolean check
24
+ console.log(isEven(10)); // true
25
+ console.log(isEven(7)); // false
26
+
27
+ // Human-readable result
28
+ console.log(parity(10)); // "even"
29
+ console.log(parity(7)); // "odd"
30
+
31
+ โš™๏ธ **API Reference**
32
+ isEven(number)
33
+
34
+ Returns true if the number is even, otherwise false.
35
+
36
+ isEven(4); // true
37
+ isEven(9); // false
38
+ parity(number)
39
+
40
+ Returns a string representing the number parity:
41
+
42
+ "even"
43
+ "odd"
44
+ parity(2); // "even"
45
+ parity(3); // "odd"
46
+
47
+ ๐Ÿงช **Example**
48
+ for (let i = 1; i <= 10; i++) {
49
+ console.log(i, "โ†’", parity(i));
50
+ }
51
+
52
+ Output:
53
+
54
+ 1 โ†’ odd
55
+ 2 โ†’ even
56
+ 3 โ†’ odd
57
+ 4 โ†’ even
58
+ 5 โ†’ odd
59
+ 6 โ†’ even
60
+ 7 โ†’ odd
61
+ 8 โ†’ even
62
+ 9 โ†’ odd
63
+ 10 โ†’ even
64
+
65
+ โšก **Features**
66
+
67
+ โšก Ultra lightweight
68
+ ๐Ÿง  Zero dependencies
69
+ ๐Ÿš€ Fast execution
70
+ ๐Ÿ“ฆ Works in Node.js
71
+ ๐Ÿงฉ Simple and predictable API
72
+
73
+ ๐Ÿ“Œ **Roadmap**
74
+ TypeScript support
75
+ ESM module support
76
+ CLI tool (npx num-parity-core)
77
+ Browser compatibility
78
+ Benchmark optimizations
79
+ ๐Ÿค Contributing
80
+
81
+ Pull requests are welcome.
82
+
83
+ Keep it simple. Keep it clean.
84
+
85
+ ๐Ÿ“„ License
86
+
87
+ MIT โ€” use freely, build freely, improve freely.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "num-parity-core",
3
- "version": "1.0.0",
3
+ "version": "1.1.1",
4
4
  "description": "Simple package to check if a number is even or odd",
5
5
  "main": "index.js",
6
6
  "keywords": [
@@ -12,4 +12,4 @@
12
12
  ],
13
13
  "author": "seu-nome",
14
14
  "license": "MIT"
15
- }
15
+ }
package/Debugs/tst.js DELETED
@@ -1,5 +0,0 @@
1
- const pkg = require("../index");
2
-
3
- pkg.isEven(10); // true
4
- pkg.parity(7); // odd
5
- console.log(pkg.isEven(10)); // true
package/start.js DELETED
@@ -1 +0,0 @@
1
- require('./Debugs/tst.js')