
Security News
Another Round of TEA Protocol Spam Floods npm, But It’s Not a Worm
Recent coverage mislabels the latest TEA protocol spam as a worm. Here’s what’s actually happening.
@magic/deep
Advanced tools
Work with deeply nested objects and arrays.
npm i --save --save-exact @magic/deep
// single function
import { equal, flatten, loop, merge } from '@magic/deep'
// object with all functions
import deep from '@magic/deep'
Currently implemented:
// test equality
deep.equal(['shallow', ['deep']], ['shallow', ['deep']])
// true
// alias
// deep.equals, deep.eq
// test difference
deep.different(['shallow', ['deep']], ['shallow', ['deep']])
// false
// alias
// deep.diff
// flatten a deeply nested array
deep.flatten(['shallow', ['deep']])
// ['shallow', 'deep']
// apply function add
const add = e => e + 1
// for each item
const items = [1, 2, [3]]
// using a deeply nested array
deep.loop(add, items)
// or
deep.loop(items, add)
// returns [2, 3, [4]]
// merge objects and arrays, with infinite recursion if needed.
// this can be slow...
deep.merge({ obj1Key: { val: 1 } }, { obj2Key: { val: 2 } })
// { obj1Key: { val: 1}, obj2Key: { val: 2 } }
deep.merge({ key: { val: 1, str: 'test' } }, { key: { val: 2, str: 'overwritten' } })
// { key: { val: 2, str: 'overwritten' } }
use ecmascript modules instead of commonjs.
bump required node version to 14.2.0
update dependencies
update @magic/types to avoid circular dependency
update dependencies
update dependencies
update dependencies
update dependencies
update dependencies
update dependencies
update dependencies
update dependencies
...
FAQs
manipulate nested objects and arrays
The npm package @magic/deep receives a total of 280 weekly downloads. As such, @magic/deep popularity was classified as not popular.
We found that @magic/deep demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers 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
Recent coverage mislabels the latest TEA protocol spam as a worm. Here’s what’s actually happening.

Security News
PyPI adds Trusted Publishing support for GitLab Self-Managed as adoption reaches 25% of uploads

Research
/Security News
A malicious Chrome extension posing as an Ethereum wallet steals seed phrases by encoding them into Sui transactions, enabling full wallet takeover.