
Research
Namastex.ai npm Packages Hit with TeamPCP-Style CanisterWorm Malware
Malicious Namastex.ai npm packages appear to replicate TeamPCP-style Canister Worm tradecraft, including exfiltration and self-propagation.
advance-json-merge
Advanced tools
[](https://opensource.org/licenses/mit-license.php) [](https://badge.fury.io/js/advance-json-merge)
Advance json merge
Object.assign methodnpm install advance-json-merge --save
var advanceMerge = require('advance-json-merge');
Include the pre-built script.
<script src="./dist/index.umd.min.js"></script>
var { mergeWithLevel } = require('advance-json-merge');
const origin = {
e: {
a: {
c: 'o_c',
d: 'o_d'
},
b: {
e: 'o_e'
},
c: {
h: 'o_h'
},
d: {
j: 'o_j'
}
},
f: 1
};
const target = {
e: {
a: {
a: 't_a'
},
b: {
e: 't_e',
f: 't_f'
},
d: 2
},
f: {
a: {},
b: {
c: 't_c',
h: 't_h'
}
}
};
// level 0 merge
const result = mergeWithLevel(origin, target, 0);
expect(result).toEqual(target);
// level 1 merge
const result = mergeWithLevel(origin, target, 1);
expect(result).toEqual(Object.assign({}, origin, target));
// level 2 merge
const result = mergeWithLevel(origin, target, 2);
expect(result).toEqual({
e: {
a: {
a: 't_a'
},
b: {
e: 't_e',
f: 't_f'
},
c: {
h: 'o_h'
},
d: 2
},
f: {
a: {},
b: {
c: 't_c',
h: 't_h'
}
}
});
// level 3+ merge
const levelNum = chance.integer({ min: 3, max: 1000 });
const result = mergeWithLevel(origin, target, levelNum);
expect(result).toEqual({
e: {
a: {
a: 't_a',
c: 'o_c',
d: 'o_d'
},
b: {
e: 't_e',
f: 't_f'
},
c: {
h: 'o_h'
},
d: 2
},
f: {
a: {},
b: {
c: 't_c',
h: 't_h'
}
}
});
int 等原始值去理解;npm run build
npm test
npm run doc
then open the generated out/index.html file in your browser.
MIT.
FAQs
[](https://opensource.org/licenses/mit-license.php) [](https://badge.fury.io/js/advance-json-merge)
We found that advance-json-merge 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.

Research
Malicious Namastex.ai npm packages appear to replicate TeamPCP-style Canister Worm tradecraft, including exfiltration and self-propagation.

Product
Explore exportable charts for vulnerabilities, dependencies, and usage with Reports, Socket’s new extensible reporting framework.

Product
Socket for Jira lets teams turn alerts into Jira tickets with manual creation, automated ticketing rules, and two-way sync.