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:
parent
1c87c5c207
commit
332a821f2f
@ -40,10 +40,17 @@ export function objectLoop<T = any>(
|
||||
* Transform an object to an array removing the keys
|
||||
* @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)
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated use `objectValues`
|
||||
*/
|
||||
export function objectToArray<T = any>(obj: Record<string, T>): Array<T> {
|
||||
return objectValues(obj)
|
||||
}
|
||||
|
||||
/**
|
||||
* return the keys of th object
|
||||
* @param obj the object
|
||||
@ -85,9 +92,7 @@ export function objectSort<T extends Record<string, any> = Record<string, any>>(
|
||||
}
|
||||
|
||||
/**
|
||||
* Deeply clone an object
|
||||
* @param obj the object to clone
|
||||
* @deprecated Replace with objectClone
|
||||
* @deprecated use `objectClone`
|
||||
*/
|
||||
export function cloneObject<T = Record<string, any>>(obj: T): T {
|
||||
return objectClone(obj)
|
||||
|
Loading…
x
Reference in New Issue
Block a user