Whoops! You need to install Pieces OS to run the Pieces Chrome Plugin

Checking for Pieces OS Connection

Pieces OS connected

Welcome to the Pieces for Developers Web Extension!

Let's take your coding research and problem-solving in the browser to the next level.

Try below!

const deepClone = (obj: any) => {
	if (obj === null) return null;
  let clone = { ...obj };

  Object.keys(clone).forEach(
	  (key) =>
      (clone[key] = typeof obj[key] === "object" ? deepClone(obj[key]) : obj[key])
   );
	 return Array.isArray(obj) && obj.length
	   ? (clone.length = obj.length) && Array.from(clone)
	   : Array.isArray(obj)
     ? Array.from(obj)
     : clone;
};
Next