@loadmill/universal 0.3.70 → 0.3.71

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.
@@ -0,0 +1 @@
1
+ export declare const stripJsonTrailingCommas: (jsonAsString: string) => string;
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.stripJsonTrailingCommas = void 0;
4
+ var stripJsonTrailingCommas = function (jsonAsString) {
5
+ return jsonAsString.replace(/(?<=(true|false|null|["\d}\]])\s*),(?=\s*[}\]])/g, '');
6
+ };
7
+ exports.stripJsonTrailingCommas = stripJsonTrailingCommas;
8
+ //# sourceMappingURL=json-utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"json-utils.js","sourceRoot":"","sources":["../src/json-utils.ts"],"names":[],"mappings":";;;AAAO,IAAM,uBAAuB,GAAG,UAAC,YAAoB;IAC1D,OAAO,YAAY,CAAC,OAAO,CAAC,kDAAkD,EAAE,EAAE,CAAC,CAAC;AACtF,CAAC,CAAC;AAFW,QAAA,uBAAuB,2BAElC"}
@@ -17,4 +17,11 @@ export declare type Id<T> = T extends infer U ? {
17
17
  export declare type _ExclusifyUnion<T, K extends PropertyKey> = T extends unknown ? Id<T & Partial<Record<Exclude<K, keyof T>, never>>> : never;
18
18
  export declare type XOR<T> = _ExclusifyUnion<T, AllKeys<T>>;
19
19
  export declare type ParseJson = (number | string | boolean | null | object) | Array<(number | string | boolean | null | object) | Array<(number | string | boolean | null | object) | Array<any>>>;
20
+ /**
21
+ * Make a set of properties K optional in T
22
+ */
20
23
  export declare type Optional<T, K extends keyof T> = Pick<Partial<T>, K> & Omit<T, K>;
24
+ /**
25
+ * Make all properties in T optional except a set of properties K
26
+ */
27
+ export declare type PartialWithExcludes<T, K extends keyof T> = Pick<T, K> & Partial<T>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@loadmill/universal",
3
- "version": "0.3.70",
3
+ "version": "0.3.71",
4
4
  "description": "Loadmill universal utilities",
5
5
  "main": "dist/",
6
6
  "types": "dist/index.d.ts",