
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
deep-copy-ts
Advanced tools
A deep-copy (a.k.a. clone) utility function for TypeScript, based on ts-deepcopy. Explore it in CodeSandbox.
npm i deep-copy-ts
import { deepCopy } from "deep-copy-ts";
const obj = {
// Primitive value
a: 1,
b: "b",
c: {
a: [{ a: "caa1" }, { a: "caa2" }],
},
d: null,
e: undefined,
f: true,
// Reference value
g: [1, 2, 3],
h: () => {
return "h";
},
i: {
a: 1,
b: "i.b",
c: "",
d: null,
e: undefined,
f: true,
g: [1, 2, 3],
h: () => {
return "i.h";
},
i: { a: 1 },
},
j: new Date(),
k: new DataView(new ArrayBuffer(16), 0),
l: new RegExp("ab+c", "i"),
m: new ArrayBuffer(16),
n: new Float32Array(new ArrayBuffer(16), 0),
o: new Float64Array(new ArrayBuffer(16), 0),
p: new Int8Array(new ArrayBuffer(16), 0),
q: new Int16Array(new ArrayBuffer(16), 0),
r: new Int32Array(new ArrayBuffer(16), 0),
s: new Uint8Array(new ArrayBuffer(16), 0),
t: new Uint16Array(new ArrayBuffer(16), 0),
u: new Uint32Array(new ArrayBuffer(16), 0),
v: new Uint8ClampedArray(new ArrayBuffer(16), 0),
// not supported in Safari yet
w: new BigInt64Array(new ArrayBuffer(16), 0),
x: new BigUint64Array(new ArrayBuffer(16), 0),
};
const obj2 = deepCopy(obj);
console.log("obj2: " + JSON.stringify(obj2, null, 2));
console.log("obj2.h: " + obj2.h);
npm i
npm start
npm run dry-run # To check all files that will be send to npm
npm run patch-release # or minor-release/major-release
FAQs
A deep-copy utility function for TypeScript
The npm package deep-copy-ts receives a total of 3,622 weekly downloads. As such, deep-copy-ts popularity was classified as popular.
We found that deep-copy-ts demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.