Security News
RubyGems.org Adds New Maintainer Role
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
list-to-tree-lite
Advanced tools
A simple function converts a flat-list of objects with id
, parent
and children
to a tree-list of objects.
without any dependencies.
[{
id: 6,
any: 'opps'
}, {
id: 2,
parent: 5,
any: 'foo',
}, {
id: 1,
parent: 2,
any: 'bar'
}, {
id: 5,
any: 'hello'
}, {
id: 3,
parent: 2,
any: 'other'
}]
to
[{
id: 6,
any: 'opps',
children: []
}, {
id: 5,
any: 'hello',
children: [{
id: 2,
parent: 5,
any: 'foo',
children: [{
id: 1,
parent: 2,
any: 'bar',
children: []
}, {
id: 3,
parent: 2,
any: 'other',
children: []
}]
}]
}]
#Usage
listToTree(list[, options])
options.idKey
the id key of the item object, default id
options.parentKey
the parent key of the item object, default parent
options.childrenKey
the children key of the item object, default children
#Install
npm install list-to-tree-lite --save
#Test
npm run test
#License
MIT:http://william17.mit-license.org
FAQs
convert list to tree-list
We found that list-to-tree-lite 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
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.
Security News
Research
Socket's threat research team has detected five malicious npm packages targeting Roblox developers, deploying malware to steal credentials and personal data.