num-parity-core 1.1.4 โ†’ 1.1.6

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.
Files changed (2) hide show
  1. package/README.md +15 -13
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -13,13 +13,13 @@ No frameworks. No noise. Just logic.
13
13
  ---
14
14
 
15
15
  ## ๐Ÿ“ฆ Installation
16
-
17
- npm install num-parity-core
18
-
16
+ ```bash
17
+ npm install num-parity-core
18
+ ```
19
19
  ---
20
20
 
21
21
  ## ๐Ÿง  Usage
22
-
22
+ ```js
23
23
  const { isEven, parity } = require("num-parity-core");
24
24
 
25
25
  // Boolean check
@@ -29,35 +29,37 @@ console.log(isEven(7)); // false
29
29
  // Human-readable result
30
30
  console.log(parity(10)); // "even"
31
31
  console.log(parity(7)); // "odd"
32
-
32
+ ```
33
33
  ---
34
34
 
35
35
  ## โš™๏ธ API Reference
36
-
36
+ ```js
37
37
  isEven(number)
38
-
38
+ ```
39
39
  Returns true if the number is even, otherwise false.
40
-
40
+ ```js
41
41
  isEven(4); // true
42
42
  isEven(9); // false
43
43
  parity(number)
44
-
44
+ ```
45
45
  Returns a string representing the number parity:
46
46
 
47
47
  "even"
48
48
  "odd"
49
+ ```js
49
50
  parity(2); // "even"
50
51
  parity(3); // "odd"
51
-
52
+ ```
52
53
  ---
53
54
 
54
55
  ## ๐Ÿงช Example
56
+ ```js
55
57
  for (let i = 1; i <= 10; i++) {
56
58
  console.log(i, "โ†’", parity(i));
57
59
  }
58
-
60
+ ```
59
61
  Output:
60
-
62
+ ```bash
61
63
  1 โ†’ odd
62
64
  2 โ†’ even
63
65
  3 โ†’ odd
@@ -68,7 +70,7 @@ Output:
68
70
  8 โ†’ even
69
71
  9 โ†’ odd
70
72
  10 โ†’ even
71
-
73
+ ```
72
74
  ---
73
75
 
74
76
  ## โšก Features
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "num-parity-core",
3
- "version": "1.1.4",
3
+ "version": "1.1.6",
4
4
  "description": "Simple package to check if a number is even or odd",
5
5
  "main": "index.js",
6
6
  "keywords": [