@hwycdfatm/is-odd 0.0.2 → 0.0.4

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 (3) hide show
  1. package/README.md +3 -3
  2. package/index.js +2 -0
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -19,7 +19,7 @@ const isOdd = require('@hwycdfatm/is-odd');
19
19
 
20
20
  console.log(isOdd(1)); // => true (implemented!)
21
21
  console.log(isOdd(2)); // => false (implemented!)
22
- console.log(isOdd(3)); // => null (not implemented yet)
22
+ console.log(isOdd(3)); // => true (implemented!)
23
23
  console.log(isOdd(5)); // => null (not implemented yet)
24
24
  ```
25
25
 
@@ -57,7 +57,7 @@ Checks if the given number is odd.
57
57
  const isOdd = require('@hwycdfatm/is-odd');
58
58
 
59
59
  console.log(isOdd(1)); // => true
60
- console.log(isOdd(3)); // => null
60
+ console.log(isOdd(3)); // => true
61
61
  console.log(isOdd(NaN)); // => throws TypeError
62
62
  console.log(isOdd(Infinity)); // => throws TypeError
63
63
  ```
@@ -70,7 +70,7 @@ This package includes TypeScript definitions.
70
70
  import isOdd = require('@hwycdfatm/is-odd');
71
71
 
72
72
  const result = isOdd(1); // true
73
- const result2 = isOdd(3); // null
73
+ const result2 = isOdd(3); // true
74
74
  ```
75
75
 
76
76
  ## About
package/index.js CHANGED
@@ -23,6 +23,8 @@ module.exports = function isOdd(number) {
23
23
 
24
24
  if (number === 1) return true
25
25
  if (number === 2) return false
26
+ if (number === 3) return true
27
+ if (number === 4) return false
26
28
 
27
29
  return null
28
30
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hwycdfatm/is-odd",
3
- "version": "0.0.2",
3
+ "version": "0.0.4",
4
4
  "description": "Returns true if a number is odd, false if even, null if not implemented yet (troll version - updates coming soon!)",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",