1
0
mirror of https://github.com/dzeiocom/libs.git synced 2025-04-22 10:52:11 +00:00

deprecated objectToArray

Signed-off-by: Florian BOUILLON <florian.bouillon@delta-wings.net>
This commit is contained in:
Florian Bouillon 2021-05-21 16:21:34 +02:00
parent 1c87c5c207
commit 332a821f2f

View File

@ -40,10 +40,17 @@ export function objectLoop<T = any>(
* Transform an object to an array removing the keys * Transform an object to an array removing the keys
* @param obj the object to transform * @param obj the object to transform
*/ */
export function objectToArray<T = any>(obj: Record<string, T>): Array<T> { export function objectValues<T = any>(obj: Record<string, T>): Array<T> {
return Object.values(obj) return Object.values(obj)
} }
/**
* @deprecated use `objectValues`
*/
export function objectToArray<T = any>(obj: Record<string, T>): Array<T> {
return objectValues(obj)
}
/** /**
* return the keys of th object * return the keys of th object
* @param obj the object * @param obj the object
@ -85,9 +92,7 @@ export function objectSort<T extends Record<string, any> = Record<string, any>>(
} }
/** /**
* Deeply clone an object * @deprecated use `objectClone`
* @param obj the object to clone
* @deprecated Replace with objectClone
*/ */
export function cloneObject<T = Record<string, any>>(obj: T): T { export function cloneObject<T = Record<string, any>>(obj: T): T {
return objectClone(obj) return objectClone(obj)