socket-function 0.13.0 → 0.14.0
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/package.json +1 -1
- package/src/misc.ts +2 -0
package/package.json
CHANGED
package/src/misc.ts
CHANGED
|
@@ -324,6 +324,8 @@ export function compare(lhs: unknown, rhs: unknown): number {
|
|
|
324
324
|
return compare(typeof lhs, typeof rhs);
|
|
325
325
|
}
|
|
326
326
|
if (lhs === rhs) return 0;
|
|
327
|
+
if (lhs === null && rhs !== null) return -1;
|
|
328
|
+
if (lhs !== null && rhs === null) return 1;
|
|
327
329
|
if (typeof lhs === "number") {
|
|
328
330
|
if (Number.isNaN(lhs)) {
|
|
329
331
|
if (Number.isNaN(rhs)) return 0;
|