@nu-art/ts-common 0.203.46 → 0.203.47

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": "@nu-art/ts-common",
3
- "version": "0.203.46",
3
+ "version": "0.203.47",
4
4
  "description": "js and ts infra",
5
5
  "keywords": [
6
6
  "TacB0sS",
@@ -2,6 +2,9 @@ import { DB_Object, OmitDBObject, SubsetObjectByKeys, TS_Object } from './types'
2
2
  export declare const KeysOfDB_Object: (keyof DB_Object)[];
3
3
  export declare function dbObjectToId(i: DB_Object): string;
4
4
  export declare function removeDBObjectKeys<T extends DB_Object>(instance: T): OmitDBObject<T>;
5
+ /**
6
+ * Returns a cloned object with the keys removed.
7
+ */
5
8
  export declare function deleteKeysObject<T extends TS_Object, Ks extends keyof T>(instance: T, keysToRemove: Ks[]): Omit<T, Ks>;
6
9
  export declare function keepDBObjectKeys<T extends DB_Object>(instance: T): DB_Object;
7
10
  export declare function keepPartialObject<T extends TS_Object, Ks extends keyof T>(instance: T, keys: Ks[]): SubsetObjectByKeys<T, Ks>;
@@ -12,6 +12,9 @@ function removeDBObjectKeys(instance) {
12
12
  return deleteKeysObject(instance, exports.KeysOfDB_Object);
13
13
  }
14
14
  exports.removeDBObjectKeys = removeDBObjectKeys;
15
+ /**
16
+ * Returns a cloned object with the keys removed.
17
+ */
15
18
  function deleteKeysObject(instance, keysToRemove) {
16
19
  const _instance = (0, object_tools_1.deepClone)(instance);
17
20
  keysToRemove.forEach(key => delete _instance[key]);