@hwycdfatm/is-odd 0.0.1 → 0.0.3

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 +4 -3
  2. package/index.js +2 -0
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  > Returns true if a number is odd, false if even, null if not implemented yet.
4
4
 
5
- ⚠️ **Troll Version** - This is a "work in progress" package that implements odd number checking one number at a time. Currently only supports limited cases. More updates coming soon! 😄
5
+ ⚠️ This is a "work in progress" package that implements odd number checking one number at a time. Currently only supports limited cases. More updates coming soon! 😄
6
6
 
7
7
  ## Install
8
8
 
@@ -18,16 +18,17 @@ npm install @hwycdfatm/is-odd
18
18
  const isOdd = require('@hwycdfatm/is-odd');
19
19
 
20
20
  console.log(isOdd(1)); // => true (implemented!)
21
- console.log(isOdd(2)); // => null (not implemented yet)
21
+ console.log(isOdd(2)); // => false (implemented!)
22
22
  console.log(isOdd(3)); // => null (not implemented yet)
23
23
  console.log(isOdd(5)); // => null (not implemented yet)
24
24
  ```
25
25
 
26
26
  ## Current Status
27
27
 
28
- **Version 0.0.1** - Only the following cases are implemented:
28
+ **Version 0.0.2** - Only the following cases are implemented:
29
29
 
30
30
  ✅ `isOdd(1)` → `true`
31
+ ✅ `isOdd(2)` → `false`
31
32
  ❌ All other numbers → `null` (not implemented yet)
32
33
 
33
34
  This package will be updated regularly with more number support. Stay tuned!
package/index.js CHANGED
@@ -22,6 +22,8 @@ module.exports = function isOdd(number) {
22
22
  }
23
23
 
24
24
  if (number === 1) return true
25
+ if (number === 2) return false
26
+ if (number === 3) return true
25
27
 
26
28
  return null
27
29
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hwycdfatm/is-odd",
3
- "version": "0.0.1",
3
+ "version": "0.0.3",
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",