mirror of
https://github.com/reduxjs/redux-devtools.git
synced 2025-07-06 12:53:07 +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';
|
import cloneDeep from 'lodash.clonedeep';
|
||||||
|
|
||||||
export const copyToClipboard = (object: any) => {
|
export function copyToClipboard(object: any){
|
||||||
try {
|
try {
|
||||||
const deepCopiedObject = cloneDeep(object);
|
const deepCopiedObject = cloneDeep(object);
|
||||||
const jsonString = JSON.stringify(deepCopiedObject, null, 2);
|
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;
|
let current: any = obj;
|
||||||
for (let i = 0; i < path.length; i++) {
|
for (let i = 0; i < path.length; i++) {
|
||||||
const key = path[i];
|
const key = path[i];
|
||||||
|
|
Loading…
Reference in New Issue
Block a user