From 332a821f2ff17309d4e938fad99ea46ca812d60c Mon Sep 17 00:00:00 2001 From: Florian BOUILLON Date: Fri, 21 May 2021 16:21:34 +0200 Subject: [PATCH] deprecated `objectToArray` Signed-off-by: Florian BOUILLON --- packages/object-util/src/ObjectUtil.ts | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/packages/object-util/src/ObjectUtil.ts b/packages/object-util/src/ObjectUtil.ts index 3f5c262..cda57a3 100644 --- a/packages/object-util/src/ObjectUtil.ts +++ b/packages/object-util/src/ObjectUtil.ts @@ -40,10 +40,17 @@ export function objectLoop( * Transform an object to an array removing the keys * @param obj the object to transform */ -export function objectToArray(obj: Record): Array { +export function objectValues(obj: Record): Array { return Object.values(obj) } +/** + * @deprecated use `objectValues` + */ +export function objectToArray(obj: Record): Array { + return objectValues(obj) +} + /** * return the keys of th object * @param obj the object @@ -85,9 +92,7 @@ export function objectSort = Record>( } /** - * Deeply clone an object - * @param obj the object to clone - * @deprecated Replace with objectClone + * @deprecated use `objectClone` */ export function cloneObject>(obj: T): T { return objectClone(obj)