mirror of
https://github.com/reduxjs/redux-devtools.git
synced 2025-07-05 20:33:22 +03:00
added copy to clipboard functionality to Tree, in Actions and State tab
This commit is contained in:
parent
73618765a7
commit
8430b2ce8a
|
@ -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);
|
||||
|
|
|
@ -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];
|
||||
|
|
Loading…
Reference in New Issue
Block a user