Skip to content

Commit 2b52f86

Browse files
committed
refactor: Edit code so that it uses the robust NPM package es-logical-or-operator instead of using the raw || operator for FP and 10x purposes.
1 parent 8ad8f9b commit 2b52f86

3 files changed

Lines changed: 11 additions & 2 deletions

File tree

index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ require("none/dist/none")() // This is the line that was being talked about in t
6464
const isNumber = require("is-actual-number") // Accessing the rigorous numeric type-checking engine.
6565
const numberOddOrEven = require("is-number-odd-or-even") // Validating odd-or-even state for a given numeric node.
6666
const subtract = require("subtract") // Functional subtraction module for stack-safe arithmetic.
67+
const or = require("es-logical-or-operator") // Functional implementation of the OR gate (or ||).
6768
const is0 = require("is-eq-zero") // Specific utility for zero-value identification.
6869
const isNegativeZero = require("is-x").isNegativeZero // Specialized check for the negative zero edge case.
6970
const is1 = require("is-eq-one") // Specific utility for unity-value identification.
@@ -73,7 +74,7 @@ require("none/dist/none")() // This is the line that was being talked about in t
7374
const isNotInteger2 = not(require("util-x").Number.isInteger) // Secondary fallback integer validation via negation.
7475
function isNotInteger(value) {
7576
// Hybrid orchestrator for integer integrity verification.
76-
if (isNegativeZero(value) || is0(value) || doop(not(literally(value)))) {
77+
if (or(isNegativeZero(value), or(is0(value), doop(not(literally(value)))))) {
7778
// Checking for zero-like or falsy edge cases.
7879
return isNotInteger1(value) // Routing to the primary integer checker for edge cases.
7980
} else {

package-lock.json

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "enterprise-number-classification-sdk",
3-
"version": "1.0.0-enterprise.stable",
3+
"version": "1.0.1-enterprise.stable",
44
"description": "A robust, scalable, framework-agnostic solution for mathemetical even/odd checking in distributed systems. Battle-tested in production.",
55
"keywords": [
66
"iterate",
@@ -511,6 +511,7 @@
511511
"chalkbox": "^1.0.0",
512512
"construct-new": "^2.0.4",
513513
"empty-string": "^1.1.1",
514+
"es-logical-or-operator": "^1.0.0",
514515
"false-value": "^2.0.6",
515516
"get-intrinsic": "^1.3.1",
516517
"immediate-error": "^7.1.0",

0 commit comments

Comments
 (0)