Security News
NIST Misses 2024 Deadline to Clear NVD Backlog
NIST has failed to meet its self-imposed deadline of clearing the NVD's backlog by the end of the fiscal year. Meanwhile, CVE's awaiting analysis have increased by 33% since June.
A pure function to convert a map into a tree structure.
The following opinions must be taken into account since the primary use case of this library is redux-devtools-chart-monitor:
someNestedObject
and someNestedArray
in the output below, or the corresponding test.map2tree(someMap, options = {
key: 'state', // the name you want for as the root node of the output tree
pushMethod: 'push' // use 'unshift' to change the order children nodes are added
})
const someMap = {
someReducer: {
todos: [
{title: 'map', someNestedObject: {foo: 'bar'}},
{title: 'to', someNestedArray: ['foo', 'bar']},
{title: 'tree'},
{title: 'map2tree'}
],
completedCount: 1
},
otherReducer: {
foo: 0,
bar:{key: 'value'}
}
};
{
name: `${options.key}`,
children: [
{
name: 'someReducer',
children: [
{
name: 'todos',
children: [
{
name: 'todo[0]',
object: {
title: 'map',
someNestedObject: {foo: 'bar'}
}
},
{
name: 'todo[1]',
object: {
title: 'to',
someNestedArray: ['foo', 'bar']
}
},
// ...
]
},
// ...
]
},
{
name: 'otherReducer',
children: [
{
name: 'foo',
value: 0
},
{
name: 'bar',
object: {
key: 'value'
}
}
]
}
]
}
FAQs
Utility for mapping maps to trees
The npm package map2tree receives a total of 4,040 weekly downloads. As such, map2tree popularity was classified as popular.
We found that map2tree demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 4 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
NIST has failed to meet its self-imposed deadline of clearing the NVD's backlog by the end of the fiscal year. Meanwhile, CVE's awaiting analysis have increased by 33% since June.
Security News
Cloudflare has launched a setup wizard allowing users to easily create and manage a security.txt file for vulnerability disclosure on their websites.
Security News
The Socket Research team breaks down a malicious npm package targeting the legitimate DOMPurify library. It uses obfuscated code to hide that it is exfiltrating browser and crypto wallet data.