@bemoje/object 0.0.1

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.
Files changed (95) hide show
  1. package/LICENSE +21 -0
  2. package/dist/index.cjs.js +6 -0
  3. package/dist/index.cjs.js.map +1 -0
  4. package/dist/index.esm.js +6 -0
  5. package/dist/index.esm.js.map +1 -0
  6. package/dist/types/index.d.ts +41 -0
  7. package/dist/types/index.d.ts.map +1 -0
  8. package/dist/types/lib/createObjectFactory.d.ts +14 -0
  9. package/dist/types/lib/createObjectFactory.d.ts.map +1 -0
  10. package/dist/types/lib/getConstructor.d.ts +14 -0
  11. package/dist/types/lib/getConstructor.d.ts.map +1 -0
  12. package/dist/types/lib/inheritStaticMembers.d.ts +26 -0
  13. package/dist/types/lib/inheritStaticMembers.d.ts.map +1 -0
  14. package/dist/types/lib/iterableFirstElement.d.ts +12 -0
  15. package/dist/types/lib/iterableFirstElement.d.ts.map +1 -0
  16. package/dist/types/lib/iteratePrototypeChain.d.ts +23 -0
  17. package/dist/types/lib/iteratePrototypeChain.d.ts.map +1 -0
  18. package/dist/types/lib/objDeepFreeze.d.ts +30 -0
  19. package/dist/types/lib/objDeepFreeze.d.ts.map +1 -0
  20. package/dist/types/lib/objDelete.d.ts +15 -0
  21. package/dist/types/lib/objDelete.d.ts.map +1 -0
  22. package/dist/types/lib/objEntries.d.ts +16 -0
  23. package/dist/types/lib/objEntries.d.ts.map +1 -0
  24. package/dist/types/lib/objEntriesArray.d.ts +16 -0
  25. package/dist/types/lib/objEntriesArray.d.ts.map +1 -0
  26. package/dist/types/lib/objFilter.d.ts +16 -0
  27. package/dist/types/lib/objFilter.d.ts.map +1 -0
  28. package/dist/types/lib/objForEach.d.ts +17 -0
  29. package/dist/types/lib/objForEach.d.ts.map +1 -0
  30. package/dist/types/lib/objGet.d.ts +19 -0
  31. package/dist/types/lib/objGet.d.ts.map +1 -0
  32. package/dist/types/lib/objGetOrElse.d.ts +16 -0
  33. package/dist/types/lib/objGetOrElse.d.ts.map +1 -0
  34. package/dist/types/lib/objHas.d.ts +17 -0
  35. package/dist/types/lib/objHas.d.ts.map +1 -0
  36. package/dist/types/lib/objIsEmpty.d.ts +18 -0
  37. package/dist/types/lib/objIsEmpty.d.ts.map +1 -0
  38. package/dist/types/lib/objKeys.d.ts +17 -0
  39. package/dist/types/lib/objKeys.d.ts.map +1 -0
  40. package/dist/types/lib/objKeysArray.d.ts +15 -0
  41. package/dist/types/lib/objKeysArray.d.ts.map +1 -0
  42. package/dist/types/lib/objMap.d.ts +16 -0
  43. package/dist/types/lib/objMap.d.ts.map +1 -0
  44. package/dist/types/lib/objMapKeys.d.ts +17 -0
  45. package/dist/types/lib/objMapKeys.d.ts.map +1 -0
  46. package/dist/types/lib/objMapMutable.d.ts +17 -0
  47. package/dist/types/lib/objMapMutable.d.ts.map +1 -0
  48. package/dist/types/lib/objOmitKeys.d.ts +15 -0
  49. package/dist/types/lib/objOmitKeys.d.ts.map +1 -0
  50. package/dist/types/lib/objOmitKeysMutable.d.ts +14 -0
  51. package/dist/types/lib/objOmitKeysMutable.d.ts.map +1 -0
  52. package/dist/types/lib/objPropertyValueToGetter.d.ts +23 -0
  53. package/dist/types/lib/objPropertyValueToGetter.d.ts.map +1 -0
  54. package/dist/types/lib/objReduce.d.ts +19 -0
  55. package/dist/types/lib/objReduce.d.ts.map +1 -0
  56. package/dist/types/lib/objReverse.d.ts +14 -0
  57. package/dist/types/lib/objReverse.d.ts.map +1 -0
  58. package/dist/types/lib/objSet.d.ts +16 -0
  59. package/dist/types/lib/objSet.d.ts.map +1 -0
  60. package/dist/types/lib/objSize.d.ts +14 -0
  61. package/dist/types/lib/objSize.d.ts.map +1 -0
  62. package/dist/types/lib/objSortKeys.d.ts +15 -0
  63. package/dist/types/lib/objSortKeys.d.ts.map +1 -0
  64. package/dist/types/lib/objToMap.d.ts +18 -0
  65. package/dist/types/lib/objToMap.d.ts.map +1 -0
  66. package/dist/types/lib/objUpdate.d.ts +15 -0
  67. package/dist/types/lib/objUpdate.d.ts.map +1 -0
  68. package/dist/types/lib/objUpdatePropertyDescriptors.d.ts +17 -0
  69. package/dist/types/lib/objUpdatePropertyDescriptors.d.ts.map +1 -0
  70. package/dist/types/lib/objValues.d.ts +21 -0
  71. package/dist/types/lib/objValues.d.ts.map +1 -0
  72. package/dist/types/lib/objValuesArray.d.ts +15 -0
  73. package/dist/types/lib/objValuesArray.d.ts.map +1 -0
  74. package/dist/types/lib/objWalk.d.ts +19 -0
  75. package/dist/types/lib/objWalk.d.ts.map +1 -0
  76. package/dist/types/lib/setEnumerable.d.ts +19 -0
  77. package/dist/types/lib/setEnumerable.d.ts.map +1 -0
  78. package/dist/types/lib/setNonConfigurable.d.ts +21 -0
  79. package/dist/types/lib/setNonConfigurable.d.ts.map +1 -0
  80. package/dist/types/lib/setNonEnumerable.d.ts +16 -0
  81. package/dist/types/lib/setNonEnumerable.d.ts.map +1 -0
  82. package/dist/types/lib/setNonWritable.d.ts +22 -0
  83. package/dist/types/lib/setNonWritable.d.ts.map +1 -0
  84. package/dist/types/lib/setWritable.d.ts +17 -0
  85. package/dist/types/lib/setWritable.d.ts.map +1 -0
  86. package/dist/types/lib/toJson.d.ts +13 -0
  87. package/dist/types/lib/toJson.d.ts.map +1 -0
  88. package/dist/types/types/Constructor.d.ts +8 -0
  89. package/dist/types/types/Constructor.d.ts.map +1 -0
  90. package/dist/types/types/ConstructorOf.d.ts +5 -0
  91. package/dist/types/types/ConstructorOf.d.ts.map +1 -0
  92. package/dist/types/types/ObjectKey.d.ts +2 -0
  93. package/dist/types/types/ObjectKey.d.ts.map +1 -0
  94. package/package.json +35 -0
  95. package/project.json +8 -0
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Applies a callback function to each key-value pair in an object.
3
+ * @param object The object to iterate over.
4
+ * @param callback The function to apply to each keyvalue pair.
5
+ * @template T - The type of the object's properties.
6
+ * @param - An optional function to determine the keys to iterate over. Defaults to `Object.keys`.
7
+ * @returns The original object.
8
+ * @param getKeys The function to retrieve the keys of the object.
9
+ * @example ```ts
10
+ * const myObject = { a: 1, b: 2, c: 3 };
11
+ * objForEach(myObject, (value, key) => {
12
+ * //=> ${key}: ${value}
13
+ * });
14
+ * ```
15
+ */
16
+ export declare function objForEach<T>(object: Record<string, T>, callback: (value: T, key: string) => void, getKeys?: (obj: typeof object) => Iterable<string>): typeof object;
17
+ //# sourceMappingURL=objForEach.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"objForEach.d.ts","sourceRoot":"","sources":["../../../src/lib/objForEach.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,UAAU,CAAC,CAAC,EAC1B,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC,EACzB,QAAQ,EAAE,CAAC,KAAK,EAAE,CAAC,EAAE,GAAG,EAAE,MAAM,KAAK,IAAI,EACzC,OAAO,GAAE,CAAC,GAAG,EAAE,OAAO,MAAM,KAAK,QAAQ,CAAC,MAAM,CAAe,GAC9D,OAAO,MAAM,CAKf"}
@@ -0,0 +1,19 @@
1
+ import { ObjectKey } from '../types/ObjectKey';
2
+ /**
3
+ * Retrieves the value associated with the specified key from an object.
4
+ * @param obj The object from which to retrieve the value.
5
+ * @template K - The type of the keys in the object.
6
+ * @returns The value of the specified key in the object, or `undefined` if the key does not exist.
7
+ * @param key The key of the value to retrieve.
8
+ * @example ```ts
9
+ * const myObj = { name: 'John', age: 30 };
10
+ * objGet(myObj, 'name');
11
+ * //=> 'John'
12
+ * objGet(myObj, 'age');
13
+ * //=> 30
14
+ * objGet(myObj, 'address');
15
+ * //=> undefined
16
+ * ```
17
+ */
18
+ export declare function objGet<V>(obj: Record<ObjectKey, V>, key: ObjectKey): V | undefined;
19
+ //# sourceMappingURL=objGet.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"objGet.d.ts","sourceRoot":"","sources":["../../../src/lib/objGet.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAA;AAE9C;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,MAAM,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,CAAC,SAAS,EAAE,CAAC,CAAC,EAAE,GAAG,EAAE,SAAS,GAAG,CAAC,GAAG,SAAS,CAElF"}
@@ -0,0 +1,16 @@
1
+ import { ObjectKey } from '../types/ObjectKey';
2
+ /**
3
+ * This function attempts to retrieve a value from an object using a provided key.
4
+ * If the key does not exist in the object, it uses a callback function to generate a default value.
5
+ * @param obj The object from which to retrieve the value.
6
+ * @param key The key to use when retrieving the value.
7
+ * @param callback The function to call when the key does not exist in the object. This function should return the default value.
8
+ * @returns The value associated with the key in the object, or the result of the callback function if the key does not exist in the object.
9
+ * @example ```ts
10
+ * objGetOrElse({ a: 1, b: 2 }, 'c', (key) => 3);;
11
+ * //=> 3
12
+ * ```
13
+ * @typeparam V - The type of the values in the object.
14
+ */
15
+ export declare function objGetOrElse<V>(obj: Record<ObjectKey, V>, key: ObjectKey, callback: (key: ObjectKey) => V): V;
16
+ //# sourceMappingURL=objGetOrElse.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"objGetOrElse.d.ts","sourceRoot":"","sources":["../../../src/lib/objGetOrElse.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAA;AAE9C;;;;;;;;;;;;GAYG;AACH,wBAAgB,YAAY,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,CAAC,SAAS,EAAE,CAAC,CAAC,EAAE,GAAG,EAAE,SAAS,EAAE,QAAQ,EAAE,CAAC,GAAG,EAAE,SAAS,KAAK,CAAC,GAAG,CAAC,CAI7G"}
@@ -0,0 +1,17 @@
1
+ import { ObjectKey } from '../types/ObjectKey';
2
+ /**
3
+ * Checks if an object has a specific key.
4
+ * @param obj The object to check.
5
+ * @template K - The type of the keys in the object.
6
+ * @returns Returns true if the object has the key, false otherwise.
7
+ * @param key The key to check for.
8
+ * @example ```ts
9
+ * const myObj = { name: 'John', age: 30 };
10
+ * objHas(myObj, 'name');
11
+ * //=> true
12
+ * objHas(myObj, 'email');
13
+ * //=> false
14
+ * ```
15
+ */
16
+ export declare function objHas<V>(obj: Record<ObjectKey, V>, key: ObjectKey): boolean;
17
+ //# sourceMappingURL=objHas.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"objHas.d.ts","sourceRoot":"","sources":["../../../src/lib/objHas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAA;AAE9C;;;;;;;;;;;;;GAaG;AACH,wBAAgB,MAAM,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,CAAC,SAAS,EAAE,CAAC,CAAC,EAAE,GAAG,EAAE,SAAS,GAAG,OAAO,CAE5E"}
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Checks if an object is empty. This function iterates over the keys of the provided object and checks if any key is defined.
3
+ * @remarks This function uses the `Object.keys()` method to check if the object has any keys.
4
+ * If the object has at least one key, the function returns `false`, otherwise it returns `true`.
5
+ * @typeparam T - The type of the values in the object.
6
+ * @returns A boolean indicating whether the object is empty or not.
7
+ * @param obj The object to check.
8
+ * @example ```ts
9
+ * const emptyObject = {};
10
+ * const nonEmptyObject = { key: 'value' };
11
+ * objIsEmpty(emptyObject);
12
+ * //=> true
13
+ * objIsEmpty(nonEmptyObject);
14
+ * //=> false
15
+ * ```
16
+ */
17
+ export declare function objIsEmpty<T>(obj: Record<string, T>): boolean;
18
+ //# sourceMappingURL=objIsEmpty.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"objIsEmpty.d.ts","sourceRoot":"","sources":["../../../src/lib/objIsEmpty.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,UAAU,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC,GAAG,OAAO,CAK7D"}
@@ -0,0 +1,17 @@
1
+ import { ObjectKey } from '../types/ObjectKey';
2
+ /**
3
+ * Returns an iterable of all the keys in the given object.
4
+ * @remarks This function is a part of the `utils` module.
5
+ * @typeparam V - The type of the values in the object.
6
+ * @returns An iterable of the object's keys.
7
+ * @param obj The object whose keys to iterate over.
8
+ * @example ```ts
9
+ * const obj = { a: 1, b: 2, c: 3 };
10
+ * const keys = objKeys(obj);
11
+ * for (const key of keys) {
12
+ * //=> //=> //=> c
13
+ * }
14
+ * ```
15
+ */
16
+ export declare function objKeys<V>(obj: Record<ObjectKey, V>): Iterable<string>;
17
+ //# sourceMappingURL=objKeys.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"objKeys.d.ts","sourceRoot":"","sources":["../../../src/lib/objKeys.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAA;AAE9C;;;;;;;;;;;;;GAaG;AACH,wBAAiB,OAAO,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,CAAC,SAAS,EAAE,CAAC,CAAC,GAAG,QAAQ,CAAC,MAAM,CAAC,CAEvE"}
@@ -0,0 +1,15 @@
1
+ import { ObjectKey } from '../types/ObjectKey';
2
+ /**
3
+ * Returns an array of keys from the provided object.
4
+ * @remarks This function is a part of Object Utilities.
5
+ * @typeparam V - The type of values in the object.
6
+ * @returns The array of keys of the input object.
7
+ * @param obj The object from which to extract the keys.
8
+ * @example ```ts
9
+ * const obj = { a: 1, b: 2, c: 3 };
10
+ * objKeysArray(obj);
11
+ * //=> ['a', 'b', 'c']
12
+ * ```
13
+ */
14
+ export declare function objKeysArray<V>(obj: Record<ObjectKey, V>): string[];
15
+ //# sourceMappingURL=objKeysArray.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"objKeysArray.d.ts","sourceRoot":"","sources":["../../../src/lib/objKeysArray.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAA;AAE9C;;;;;;;;;;;GAWG;AACH,wBAAgB,YAAY,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,CAAC,SAAS,EAAE,CAAC,CAAC,GAAG,MAAM,EAAE,CAEnE"}
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Maps over the values of an object and returns a new object with the mapped values.
3
+ * @param object The object to map over.
4
+ * @param callback The mapping function to apply to each value.
5
+ * @template T The type of the values in the input object.
6
+ * @param An optional function to determine the keys to iterate over. Defaults to `Object.keys`.
7
+ * @returns A new object with the same keys as the input object, but with each value transformed by the callback function.
8
+ * @param getKeys The function used to get the keys of the object.
9
+ * @example ```ts
10
+ * const object = { a: 1, b: 2, c: 3 }
11
+ * const callback = (value: number, key: string) => value * 2
12
+ * objMap(object, callback) //=> { a: 2, b: 4, c: 6 }
13
+ * ```
14
+ */
15
+ export declare function objMap<T>(object: Record<string, T>, callback: (value: T, key: string) => T, getKeys?: (obj: typeof object) => Iterable<string>): Record<string, T>;
16
+ //# sourceMappingURL=objMap.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"objMap.d.ts","sourceRoot":"","sources":["../../../src/lib/objMap.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,wBAAgB,MAAM,CAAC,CAAC,EACtB,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC,EACzB,QAAQ,EAAE,CAAC,KAAK,EAAE,CAAC,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC,EACtC,OAAO,GAAE,CAAC,GAAG,EAAE,OAAO,MAAM,KAAK,QAAQ,CAAC,MAAM,CAAe,GAC9D,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC,CAMnB"}
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Maps the keys of an object using a callback function.
3
+ * @param object The object whose keys will be mapped.
4
+ * @param callback The callback function that maps the keys.
5
+ * @template T - The type of the values in the object.
6
+ * @param - The function to get the keys of the object.
7
+ * @returns A new object with the keys mapped.
8
+ * @param getKeys The function that retrieves the keys of the object.
9
+ * @example ```ts
10
+ * const object = { a: 1, b: 2, c: 3 };
11
+ * const callback = (key: string, value: number) => key.toUpperCase();
12
+ * objMapKeys(object, callback);
13
+ * //=> { A: 1, B: 2, C: 3 }
14
+ * ```
15
+ */
16
+ export declare function objMapKeys<T>(object: Record<string, T>, callback: (key: string, value: T) => string, getKeys?: (obj: typeof object) => Iterable<string>): Record<string, T>;
17
+ //# sourceMappingURL=objMapKeys.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"objMapKeys.d.ts","sourceRoot":"","sources":["../../../src/lib/objMapKeys.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,UAAU,CAAC,CAAC,EAC1B,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC,EACzB,QAAQ,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,KAAK,MAAM,EAC3C,OAAO,GAAE,CAAC,GAAG,EAAE,OAAO,MAAM,KAAK,QAAQ,CAAC,MAAM,CAAe,GAC9D,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC,CAMnB"}
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Applies a callback function to each key-value pair in an object and mutates the object.
3
+ * @param object The object to be mapped.
4
+ * @param callback The callback function to apply to each valuekey pair.
5
+ * @template T - The type of the properties in the object.
6
+ * @param - An optional function to determine the keys to be iterated over.
7
+ * @returns The mutated object.
8
+ * @param getKeys The function used to get the keys of the object.
9
+ * @example ```ts
10
+ * const obj = { a: 1, b: 2, c: 3 };
11
+ * const callback = (value: number, key: string) => value * 2;
12
+ * objMapMutable(obj, callback);
13
+ * //=> { a: 2, b: 4, c: 6 }
14
+ * ```
15
+ */
16
+ export declare function objMapMutable<T>(object: Record<string, T>, callback: (value: T, key: string) => T, getKeys?: (obj: typeof object) => Iterable<string>): typeof object;
17
+ //# sourceMappingURL=objMapMutable.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"objMapMutable.d.ts","sourceRoot":"","sources":["../../../src/lib/objMapMutable.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,aAAa,CAAC,CAAC,EAC7B,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC,EACzB,QAAQ,EAAE,CAAC,KAAK,EAAE,CAAC,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC,EACtC,OAAO,GAAE,CAAC,GAAG,EAAE,OAAO,MAAM,KAAK,QAAQ,CAAC,MAAM,CAAe,GAC9D,OAAO,MAAM,CAKf"}
@@ -0,0 +1,15 @@
1
+ import { ObjectKey } from '../types/ObjectKey';
2
+ /**
3
+ * Deletes specified keys from an object. This function takes an object and an array of keys to be deleted from the object. It returns a new object with the specified keys removed.
4
+ * @param obj The object from which keys are to be deleted.
5
+ * @template V - The type of the values in the object.
6
+ * @returns A new object with the specified keys deleted.
7
+ * @param keys The keys to be deleted from the object.
8
+ * @example ```ts
9
+ * const obj = { a: 1, b: 2, c: 3 };
10
+ * objOmitKeys(obj, 'a', 'c');
11
+ * //=> { b: 2 }
12
+ * ```
13
+ */
14
+ export declare function objOmitKeys<K extends ObjectKey, V>(obj: Record<K, V>, ...keys: string[]): Record<K, V>;
15
+ //# sourceMappingURL=objOmitKeys.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"objOmitKeys.d.ts","sourceRoot":"","sources":["../../../src/lib/objOmitKeys.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAA;AAG9C;;;;;;;;;;;GAWG;AACH,wBAAgB,WAAW,CAAC,CAAC,SAAS,SAAS,EAAE,CAAC,EAAE,GAAG,EAAE,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,GAAG,IAAI,EAAE,MAAM,EAAE,GAAG,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,CAEtG"}
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Deletes the specified keys from an object in a mutable way.
3
+ * @param obj The object from which to delete the keys.
4
+ * @returns The modified object with the specified keys deleted.
5
+ * @typeparam V - The type of the values in the object.
6
+ * @param keys The keys to delete from the object.
7
+ * @example ```ts
8
+ * const obj = { a: 1, b: 2, c: 3 };
9
+ * objOmitKeysMutable(obj, 'a', 'c');
10
+ * //=> { b: 2 }
11
+ * ```
12
+ */
13
+ export declare function objOmitKeysMutable<V>(obj: Record<string, V>, ...keys: string[]): Record<string, V>;
14
+ //# sourceMappingURL=objOmitKeysMutable.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"objOmitKeysMutable.d.ts","sourceRoot":"","sources":["../../../src/lib/objOmitKeysMutable.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,wBAAgB,kBAAkB,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC,EAAE,GAAG,IAAI,EAAE,MAAM,EAAE,GAAG,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC,CAKlG"}
@@ -0,0 +1,23 @@
1
+ import { ObjectKey } from '../types/ObjectKey';
2
+ /**
3
+ * Converts the specified properties of an object into getter functions.
4
+ * @template K - The type of the keys of the object.
5
+ * @template V - The type of the values of the object.
6
+ * @template T - The type of the object.
7
+ * @param object The object whose properties are to be converted into getter functions.
8
+ * @param propertyNames The names of the properties to be converted into getter functions.
9
+ * @returns The object with the specified properties converted into getter functions.
10
+ * @throws Throws an error if the property descriptor for a specified property name is not found.
11
+ * @example ```ts
12
+ * const obj = { a: 1, b: 2, c: 3 };
13
+ * objPropertyValueToGetter(obj, 'a', 'b');
14
+ * obj.a;;
15
+ * //=> 1
16
+ * obj.b;;
17
+ * //=> 2
18
+ * obj.c;;
19
+ * //=> 3
20
+ * ```
21
+ */
22
+ export declare function objPropertyValueToGetter<V, T extends Record<ObjectKey, V>>(object: T, ...propertyNames: ObjectKey[]): T;
23
+ //# sourceMappingURL=objPropertyValueToGetter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"objPropertyValueToGetter.d.ts","sourceRoot":"","sources":["../../../src/lib/objPropertyValueToGetter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAA;AAE9C;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,wBAAwB,CAAC,CAAC,EAAE,CAAC,SAAS,MAAM,CAAC,SAAS,EAAE,CAAC,CAAC,EACxE,MAAM,EAAE,CAAC,EACT,GAAG,aAAa,EAAE,SAAS,EAAE,GAC5B,CAAC,CAQH"}
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Reduces the values of an object into a single value.
3
+ * @param object The object to reduce.
4
+ * @param callback The function that handles the reduction logic.
5
+ * @param accum The initial value of the accumulator.
6
+ * @template T - The type of the values in the input object.
7
+ * @param - An optional function to get the keys of the object. Defaults to `Object.keys`.
8
+ * @returns The final accumulated value.
9
+ * @param getKeys The function that retrieves the keys of the object.
10
+ * @example ```ts
11
+ * const object = { a: 1, b: 2, c: 3 };
12
+ * const callback = (accum, value, key) => accum + value;
13
+ * const initialAccum = 0;
14
+ * objReduce(object, callback, initialAccum);
15
+ * //=> 6
16
+ * ```
17
+ */
18
+ export declare function objReduce<T, A>(object: Record<string, T>, callback: (accum: A, value: T, key: string) => A, accum: A, getKeys?: (obj: typeof object) => Iterable<string>): A;
19
+ //# sourceMappingURL=objReduce.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"objReduce.d.ts","sourceRoot":"","sources":["../../../src/lib/objReduce.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,SAAS,CAAC,CAAC,EAAE,CAAC,EAC5B,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC,EACzB,QAAQ,EAAE,CAAC,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC,EAChD,KAAK,EAAE,CAAC,EACR,OAAO,GAAE,CAAC,GAAG,EAAE,OAAO,MAAM,KAAK,QAAQ,CAAC,MAAM,CAAe,GAC9D,CAAC,CAKH"}
@@ -0,0 +1,14 @@
1
+ import { ObjectKey } from '../types/ObjectKey';
2
+ /**
3
+ * Reverses the order of the properties in the given object.
4
+ * @remarks This function does not mutate the original object. It returns a new object with the properties in reverse order.
5
+ * @param obj The object to reverse. The object's keys are of type `ObjectKey` and its values are of type `V`.
6
+ * @returns A new object with the properties of the input object in reverse order. The returned object's keys are of type `ObjectKey` and its values are of type `V`.
7
+ * @typeparam V - The type of the values in the input object and the returned object.
8
+ * @example ```ts
9
+ * objReverse({ a: 1, b: 2, c: 3 });;
10
+ * //=> { c: 3, b: 2, a: 1 }
11
+ * ```
12
+ */
13
+ export declare function objReverse<V>(obj: Record<ObjectKey, V>): Record<ObjectKey, V>;
14
+ //# sourceMappingURL=objReverse.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"objReverse.d.ts","sourceRoot":"","sources":["../../../src/lib/objReverse.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAA;AAG9C;;;;;;;;;;GAUG;AACH,wBAAgB,UAAU,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,CAAC,SAAS,EAAE,CAAC,CAAC,GAAG,MAAM,CAAC,SAAS,EAAE,CAAC,CAAC,CAE7E"}
@@ -0,0 +1,16 @@
1
+ import { ObjectKey } from '../types/ObjectKey';
2
+ /**
3
+ * Sets a value for a key in an object and returns the value.
4
+ * @template ObjectKey - The type of the keys in the object.
5
+ * @template V - The type of the values in the object.
6
+ * @param obj The object in which to set the value.
7
+ * @param key The key for which to set the value.
8
+ * @param value The value to set.
9
+ * @returns The value that was set.
10
+ * @example ```ts
11
+ * objSet({ a: 1, b: 2 }, 'a', 3);;
12
+ * //=> { a: 3, b: 2 }
13
+ * ```
14
+ */
15
+ export declare function objSet<V>(obj: Record<ObjectKey, V>, key: ObjectKey, value: V): V;
16
+ //# sourceMappingURL=objSet.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"objSet.d.ts","sourceRoot":"","sources":["../../../src/lib/objSet.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAA;AAE9C;;;;;;;;;;;;GAYG;AACH,wBAAgB,MAAM,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,CAAC,SAAS,EAAE,CAAC,CAAC,EAAE,GAAG,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC,GAAG,CAAC,CAEhF"}
@@ -0,0 +1,14 @@
1
+ import { ObjectKey } from '../types/ObjectKey';
2
+ /**
3
+ * Calculates and returns the size of the given object.
4
+ * @remarks This function uses `Object.keys(obj).length` to determine the size of the object.
5
+ * @param obj The object whose size is to be calculated.
6
+ * @typeparam V - The type of the values in the object.
7
+ * @returns The size of the object.
8
+ * @example ```ts
9
+ * objSize({ a: 1, b: 2, c: 3 });;
10
+ * //=> 3
11
+ * ```
12
+ */
13
+ export declare function objSize<V>(obj: Record<ObjectKey, V>): number;
14
+ //# sourceMappingURL=objSize.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"objSize.d.ts","sourceRoot":"","sources":["../../../src/lib/objSize.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAA;AAE9C;;;;;;;;;;GAUG;AACH,wBAAgB,OAAO,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,CAAC,SAAS,EAAE,CAAC,CAAC,GAAG,MAAM,CAE5D"}
@@ -0,0 +1,15 @@
1
+ import { ObjectKey } from '../types/ObjectKey';
2
+ /**
3
+ * Sorts the keys of an object in alphabetical order.
4
+ * @remarks This function does not mutate the original object. It returns a new object with sorted keys.
5
+ * @typeparam V - The type of the values in the object.
6
+ * @returns A new object with the same values as the original, but with keys sorted in ascending order.
7
+ * @param o The object whose keys should be sorted.
8
+ * @example ```ts
9
+ * const obj = { c: 1, a: 2, b: 3 };
10
+ * objSortKeys(obj);
11
+ * //=> { a: 2, b: 3, c: 1 }
12
+ * ```
13
+ */
14
+ export declare function objSortKeys<V>(o: Record<ObjectKey, V>): Record<ObjectKey, V>;
15
+ //# sourceMappingURL=objSortKeys.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"objSortKeys.d.ts","sourceRoot":"","sources":["../../../src/lib/objSortKeys.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAA;AAE9C;;;;;;;;;;;GAWG;AACH,wBAAgB,WAAW,CAAC,CAAC,EAAE,CAAC,EAAE,MAAM,CAAC,SAAS,EAAE,CAAC,CAAC,GAAG,MAAM,CAAC,SAAS,EAAE,CAAC,CAAC,CAE5E"}
@@ -0,0 +1,18 @@
1
+ import { ObjectKey } from '../types/ObjectKey';
2
+ /**
3
+ * Converts an object to a Map.
4
+ * @remarks This function is useful when you need to convert an object to a Map data structure.
5
+ * @typeparam V - The type of the values in the object.
6
+ * @returns A new Map object populated with the [key, value] pairs from the original object.
7
+ * @param obj The object to convert to a Map.
8
+ * @example ```ts
9
+ * const obj = { key1: 'value1', key2: 'value2' };
10
+ * const map = objToMap(obj);
11
+ * map.get('key1');
12
+ * //=> 'value1'
13
+ * map.get('key2');
14
+ * //=> 'value2'
15
+ * ```
16
+ */
17
+ export declare function objToMap<V>(obj: Record<ObjectKey, V>): Map<string, V>;
18
+ //# sourceMappingURL=objToMap.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"objToMap.d.ts","sourceRoot":"","sources":["../../../src/lib/objToMap.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAA;AAE9C;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,QAAQ,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,CAAC,SAAS,EAAE,CAAC,CAAC,GAAG,GAAG,CAAC,MAAM,EAAE,CAAC,CAAC,CAErE"}
@@ -0,0 +1,15 @@
1
+ import { ObjectKey } from '../types/ObjectKey';
2
+ /**
3
+ * Updates the value of a specific key in an object using a callback function.
4
+ * @template V - The type of the values in the object.
5
+ * @param obj The object to update.
6
+ * @param key The key of the value to update.
7
+ * @param callback The function to generate the new value. It receives the current value and the key as arguments.
8
+ * @returns The new value.
9
+ * @example ```ts
10
+ * objUpdate({ a: 1, b: 2 }, 'a', (value, key) => value + 1);;
11
+ * //=> { a: 2, b: 2 }
12
+ * ```
13
+ */
14
+ export declare function objUpdate<V>(obj: Record<ObjectKey, V>, key: ObjectKey, callback: (value: V | undefined, key: ObjectKey) => V): V;
15
+ //# sourceMappingURL=objUpdate.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"objUpdate.d.ts","sourceRoot":"","sources":["../../../src/lib/objUpdate.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAA;AAE9C;;;;;;;;;;;GAWG;AACH,wBAAgB,SAAS,CAAC,CAAC,EACzB,GAAG,EAAE,MAAM,CAAC,SAAS,EAAE,CAAC,CAAC,EACzB,GAAG,EAAE,SAAS,EACd,QAAQ,EAAE,CAAC,KAAK,EAAE,CAAC,GAAG,SAAS,EAAE,GAAG,EAAE,SAAS,KAAK,CAAC,GACpD,CAAC,CAEH"}
@@ -0,0 +1,17 @@
1
+ import { ObjectKey } from '../types/ObjectKey';
2
+ /**
3
+ * Updates the property descriptors of the specified properties on the given object.
4
+ * @param object - The object whose property descriptors are to be updated.
5
+ * @param properties - An array of property names for which the descriptors are to be updated.
6
+ * @param update - A function that takes a property descriptor and a property name, and returns a new property descriptor.
7
+ * @throws Will throw an error if any of the specified properties do not exist on the object.
8
+ * @example ```ts
9
+ * const obj = { a: 1, b: 2 };
10
+ * objUpdatePropertyDescriptors(obj, ['a', 'b'], (descriptor, property) => {
11
+ * descriptor.writable = true;
12
+ * return obj;
13
+ * });
14
+ * ```
15
+ */
16
+ export declare function objUpdatePropertyDescriptors<V>(object: Record<ObjectKey, V>, properties: string[], update: <T extends PropertyDescriptor>(descriptor: T, property: string) => T): void;
17
+ //# sourceMappingURL=objUpdatePropertyDescriptors.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"objUpdatePropertyDescriptors.d.ts","sourceRoot":"","sources":["../../../src/lib/objUpdatePropertyDescriptors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAA;AAE9C;;;;;;;;;;;;;GAaG;AACH,wBAAgB,4BAA4B,CAAC,CAAC,EAC5C,MAAM,EAAE,MAAM,CAAC,SAAS,EAAE,CAAC,CAAC,EAC5B,UAAU,EAAE,MAAM,EAAE,EACpB,MAAM,EAAE,CAAC,CAAC,SAAS,kBAAkB,EAAE,UAAU,EAAE,CAAC,EAAE,QAAQ,EAAE,MAAM,KAAK,CAAC,GAC3E,IAAI,CAQN"}
@@ -0,0 +1,21 @@
1
+ import { ObjectKey } from '../types/ObjectKey';
2
+ /**
3
+ * Returns an iterable of the values of the given object.
4
+ * @remarks This function uses the `Object.values()` method to get all the values of the object and then yields them one by one.
5
+ * @typeparam V - The type of the values in the object.
6
+ * @returns An iterable that yields all the values of the given object.
7
+ * @param obj The object whose values should be returned.
8
+ * @example ```ts
9
+ * const obj = { a: 1, b: 2, c: 3 };
10
+ * const values = objValues(obj);
11
+ * for (const value of values) {
12
+ * //=> {value}
13
+ * }
14
+ * // Output:
15
+ * // 1
16
+ * // 2
17
+ * // 3
18
+ * ```
19
+ */
20
+ export declare function objValues<V>(obj: Record<ObjectKey, V>): Iterable<V>;
21
+ //# sourceMappingURL=objValues.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"objValues.d.ts","sourceRoot":"","sources":["../../../src/lib/objValues.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAA;AAE9C;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAiB,SAAS,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,CAAC,SAAS,EAAE,CAAC,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC,CAEpE"}
@@ -0,0 +1,15 @@
1
+ import { ObjectKey } from '../types/ObjectKey';
2
+ /**
3
+ * Returns an array containing the values of the given object.
4
+ * @remarks This function is a part of Object Utilities.
5
+ * @typeparam V - The type of values in the object.
6
+ * @returns An array of the values of the object.
7
+ * @param obj The object whose values will be extracted.
8
+ * @example ```ts
9
+ * const obj = { a: 1, b: 2, c: 3 };
10
+ * objValuesArray(obj);
11
+ * //=> [1, 2, 3]
12
+ * ```
13
+ */
14
+ export declare function objValuesArray<V>(obj: Record<ObjectKey, V>): Array<V>;
15
+ //# sourceMappingURL=objValuesArray.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"objValuesArray.d.ts","sourceRoot":"","sources":["../../../src/lib/objValuesArray.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAA;AAE9C;;;;;;;;;;;GAWG;AACH,wBAAgB,cAAc,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,CAAC,SAAS,EAAE,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,CAErE"}
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Recursively traverses an object and invokes a callback function for every encountered non-object value.
3
+ * The callback function is passed the non-object value and an array representing the path to the value.
4
+ * @param node - The object to be traversed.
5
+ * @param callback - The callback function to be invoked for every non-object value.
6
+ * @example ```ts
7
+ * const obj = { a: 1, b: { c: 2, d: [3, 4] } };
8
+ * objWalk(obj, (value, path) => {
9
+ * console.log(`Path: ${path.join('.')}, Value: ${value}`);
10
+ * });
11
+ * // Output:
12
+ * // Path: a, Value: 1
13
+ * // Path: b.c, Value: 2
14
+ * // Path: b.d[0], Value: 3
15
+ * // Path: b.d[1], Value: 4
16
+ * ```
17
+ */
18
+ export declare function objWalk(node: Record<string, any>, callback: (value: any, path: string[]) => void): void;
19
+ //# sourceMappingURL=objWalk.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"objWalk.d.ts","sourceRoot":"","sources":["../../../src/lib/objWalk.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,OAAO,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,QAAQ,EAAE,CAAC,KAAK,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,IAAI,GAAG,IAAI,CAiBvG"}
@@ -0,0 +1,19 @@
1
+ import { ObjectKey } from '../types/ObjectKey';
2
+ /**
3
+ * Sets the enumerable property of the specified properties of an object to true.
4
+ * @template T - The type of the object.
5
+ * @param object The object whose properties' enumerable property will be set to true.
6
+ * @param propertyNames The names of the properties to be set enumerable.
7
+ * @returns void
8
+ * @example ```ts
9
+ * const obj = { a: 1, b: 2, c: 3 };
10
+ * setEnumerable(obj, 'a', 'b');
11
+ * Object.keys(obj);;
12
+ * //=> ['a', 'b']
13
+ * ```
14
+ * @remarks This function uses `Object.defineProperty` to set the enumerable property.
15
+ * @throws Will throw an error if any of the specified properties do not exist on the object.
16
+ * @see {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/defineProperty | Object.defineProperty}
17
+ */
18
+ export declare function setEnumerable(object: Record<ObjectKey, any>, ...properties: string[]): void;
19
+ //# sourceMappingURL=setEnumerable.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"setEnumerable.d.ts","sourceRoot":"","sources":["../../../src/lib/setEnumerable.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAA;AAG9C;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,aAAa,CAAC,MAAM,EAAE,MAAM,CAAC,SAAS,EAAE,GAAG,CAAC,EAAE,GAAG,UAAU,EAAE,MAAM,EAAE,GAAG,IAAI,CAK3F"}
@@ -0,0 +1,21 @@
1
+ import { ObjectKey } from '../types/ObjectKey';
2
+ /**
3
+ * Sets the specified properties of an object as non-configurable.
4
+ * @remarks This function modifies the original object by setting the `configurable` attribute of the specified properties to `false`.
5
+ * Once a property is made non-configurable, it can neither be deleted from the object nor changed to configurable.
6
+ * @typeparam T - The type of the object.
7
+ * @param object The object whose properties are to be made non-configurable.
8
+ * @param properties The names of the properties to be made non-configurable.
9
+ * @throws Will throw an error if any of the specified properties do not exist on the object.
10
+ * @example ```ts
11
+ * setNonConfigurable({ a: 1, b: 2, c: 3 }, 'a', 'b');
12
+ * Object.getOwnPropertyDescriptor({ a: 1, b: 2, c: 3 }, 'a');;
13
+ * //=> {value: 1, writable: true, enumerable: true, configurable: false}
14
+ * Object.getOwnPropertyDescriptor({ a: 1, b: 2, c: 3 }, 'b');;
15
+ * //=> {value: 2, writable: true, enumerable: true, configurable: false}
16
+ * Object.getOwnPropertyDescriptor({ a: 1, b: 2, c: 3 }, 'c');;
17
+ * //=> {value: 3, writable: true, enumerable: true, configurable: true}
18
+ * ```
19
+ */
20
+ export declare function setNonConfigurable(object: Record<ObjectKey, any>, ...properties: string[]): void;
21
+ //# sourceMappingURL=setNonConfigurable.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"setNonConfigurable.d.ts","sourceRoot":"","sources":["../../../src/lib/setNonConfigurable.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAA;AAG9C;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,MAAM,CAAC,SAAS,EAAE,GAAG,CAAC,EAAE,GAAG,UAAU,EAAE,MAAM,EAAE,GAAG,IAAI,CAKhG"}
@@ -0,0 +1,16 @@
1
+ import { ObjectKey } from '../types/ObjectKey';
2
+ /**
3
+ * Sets the specified properties of an object as non-enumerable.
4
+ * @remarks This function modifies the original object by setting the specified properties as non-enumerable.
5
+ * If the object or any of the property names are not valid, it throws an error.
6
+ * @param object The object whose properties are to be set as non-enumerable.
7
+ * @param properties The names of the properties to be set as non-enumerable.
8
+ * @throws Will throw an error if any of the specified properties do not exist on the object.
9
+ * @example ```ts
10
+ * setNonEnumerable({ a: 1, b: 2, c: 3 }, 'a', 'b');
11
+ * Object.keys({ a: 1, b: 2, c: 3 });;
12
+ * //=> ['c']
13
+ * ```
14
+ */
15
+ export declare function setNonEnumerable(object: Record<ObjectKey, any>, ...properties: string[]): void;
16
+ //# sourceMappingURL=setNonEnumerable.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"setNonEnumerable.d.ts","sourceRoot":"","sources":["../../../src/lib/setNonEnumerable.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAA;AAG9C;;;;;;;;;;;;GAYG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,MAAM,CAAC,SAAS,EAAE,GAAG,CAAC,EAAE,GAAG,UAAU,EAAE,MAAM,EAAE,GAAG,IAAI,CAK9F"}