@uniqu/core 0.0.1 → 0.0.2

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/dist/index.cjs CHANGED
@@ -32,7 +32,10 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
32
32
  return results.length === 1 ? results[0] : visitor.and(results);
33
33
  }
34
34
  function isPrimitive(x) {
35
- return x === null || typeof x === "string" || typeof x === "number" || typeof x === "boolean" || x instanceof RegExp || x instanceof Date;
35
+ if (x === null || typeof x !== "object") return true;
36
+ if (x instanceof RegExp || x instanceof Date) return true;
37
+ if (!Array.isArray(x) && x.constructor !== void 0 && x.constructor !== Object) return true;
38
+ return false;
36
39
  }
37
40
 
38
41
  //#endregion
package/dist/index.mjs CHANGED
@@ -30,7 +30,10 @@
30
30
  return results.length === 1 ? results[0] : visitor.and(results);
31
31
  }
32
32
  function isPrimitive(x) {
33
- return x === null || typeof x === "string" || typeof x === "number" || typeof x === "boolean" || x instanceof RegExp || x instanceof Date;
33
+ if (x === null || typeof x !== "object") return true;
34
+ if (x instanceof RegExp || x instanceof Date) return true;
35
+ if (!Array.isArray(x) && x.constructor !== void 0 && x.constructor !== Object) return true;
36
+ return false;
34
37
  }
35
38
 
36
39
  //#endregion
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uniqu/core",
3
- "version": "0.0.1",
3
+ "version": "0.0.2",
4
4
  "description": "Canonical query format types, tree walker, and utilities for Uniqu",
5
5
  "license": "MIT",
6
6
  "author": "Artem Maltsev",