@clipboard-health/util-ts 5.10.0 → 5.11.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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clipboard-health/util-ts",
3
- "version": "5.10.0",
3
+ "version": "5.11.0",
4
4
  "description": "TypeScript utilities.",
5
5
  "keywords": [
6
6
  "typescript",
package/src/index.d.ts CHANGED
@@ -5,6 +5,7 @@ export * from "./lib/forceCast";
5
5
  export * from "./lib/functional";
6
6
  export type * from "./lib/logger";
7
7
  export * from "./lib/nullish";
8
+ export * from "./lib/objects";
8
9
  export * from "./lib/strings";
9
10
  export * from "./lib/strings/parseJson";
10
11
  export type * from "./lib/types";
package/src/index.js CHANGED
@@ -7,6 +7,7 @@ tslib_1.__exportStar(require("./lib/errors"), exports);
7
7
  tslib_1.__exportStar(require("./lib/forceCast"), exports);
8
8
  tslib_1.__exportStar(require("./lib/functional"), exports);
9
9
  tslib_1.__exportStar(require("./lib/nullish"), exports);
10
+ tslib_1.__exportStar(require("./lib/objects"), exports);
10
11
  tslib_1.__exportStar(require("./lib/strings"), exports);
11
12
  tslib_1.__exportStar(require("./lib/strings/parseJson"), exports);
12
13
  //# sourceMappingURL=index.js.map
package/src/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../packages/util-ts/src/index.ts"],"names":[],"mappings":";;;AAAA,uDAA6B;AAC7B,2DAAiC;AACjC,uDAA6B;AAC7B,0DAAgC;AAChC,2DAAiC;AAEjC,wDAA8B;AAC9B,wDAA8B;AAC9B,kEAAwC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../packages/util-ts/src/index.ts"],"names":[],"mappings":";;;AAAA,uDAA6B;AAC7B,2DAAiC;AACjC,uDAA6B;AAC7B,0DAAgC;AAChC,2DAAiC;AAEjC,wDAA8B;AAC9B,wDAA8B;AAC9B,wDAA8B;AAC9B,kEAAwC"}
@@ -0,0 +1 @@
1
+ export * from "./isRecord";
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ tslib_1.__exportStar(require("./isRecord"), exports);
5
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/util-ts/src/lib/objects/index.ts"],"names":[],"mappings":";;;AAAA,qDAA2B"}
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Type guard that checks if a value is a non-null, non-array object (e.g. `{}`, `Date`, `Map`,
3
+ * a class instance) — narrowed to `Record<string, unknown>` for keyed property access.
4
+ *
5
+ * @param value - The value to check
6
+ * @returns True if the value is a record, false otherwise
7
+ */
8
+ export declare function isRecord(value: unknown): value is Record<string, unknown>;
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.isRecord = isRecord;
4
+ /**
5
+ * Type guard that checks if a value is a non-null, non-array object (e.g. `{}`, `Date`, `Map`,
6
+ * a class instance) — narrowed to `Record<string, unknown>` for keyed property access.
7
+ *
8
+ * @param value - The value to check
9
+ * @returns True if the value is a record, false otherwise
10
+ */
11
+ function isRecord(value) {
12
+ return typeof value === "object" && value !== null && !Array.isArray(value);
13
+ }
14
+ //# sourceMappingURL=isRecord.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"isRecord.js","sourceRoot":"","sources":["../../../../../../packages/util-ts/src/lib/objects/isRecord.ts"],"names":[],"mappings":";;;AAAA;;;;;;GAMG;AACH,kBAAyB,KAAc;IACrC,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;AAC9E,CAAC"}