From 8430b2ce8aa4234fa09a5f8c96e81800c4763ef2 Mon Sep 17 00:00:00 2001 From: Iliya Brook Date: Wed, 6 Mar 2024 23:21:53 +0200 Subject: [PATCH] added copy to clipboard functionality to Tree, in Actions and State tab --- .../src/utils/copyToClipboard.ts | 2 +- .../src/utils/getValueByPath.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/redux-devtools-inspector-monitor/src/utils/copyToClipboard.ts b/packages/redux-devtools-inspector-monitor/src/utils/copyToClipboard.ts index 62f0a3f0..39f4021c 100644 --- a/packages/redux-devtools-inspector-monitor/src/utils/copyToClipboard.ts +++ b/packages/redux-devtools-inspector-monitor/src/utils/copyToClipboard.ts @@ -1,6 +1,6 @@ import cloneDeep from 'lodash.clonedeep'; -export const copyToClipboard = (object: any) => { +export function copyToClipboard(object: any){ try { const deepCopiedObject = cloneDeep(object); const jsonString = JSON.stringify(deepCopiedObject, null, 2); diff --git a/packages/redux-devtools-inspector-monitor/src/utils/getValueByPath.ts b/packages/redux-devtools-inspector-monitor/src/utils/getValueByPath.ts index 9a77875c..f98ce1c2 100644 --- a/packages/redux-devtools-inspector-monitor/src/utils/getValueByPath.ts +++ b/packages/redux-devtools-inspector-monitor/src/utils/getValueByPath.ts @@ -1,4 +1,4 @@ -export const getValueByPath = (obj: any, path: (string | number)[]) => { +export function getValueByPath(obj: any, path: (string | number)[]){ let current: any = obj; for (let i = 0; i < path.length; i++) { const key = path[i];