
Security News
New CNA Scorecard Tool Ranks CVE Data Quality Across the Ecosystem
The CNA Scorecard ranks CVE issuers by data completeness, revealing major gaps in patch info and software identifiers across thousands of vulnerabilities.
append-children
Advanced tools
Append children to a DOM element.
With npm do:
npm install --save append-children
var appendChildren = require('append-children')
var element = document.createElement('div')
// append a single thing
appendChildren(element, document.createElement('p'))
// append multiple things
appendChildren(element, [
// other DOM elements
document.createElement('span'),
// strings and friends
'hello world',
123,
/regexes/gi,
new Date(),
// nested arrays of things to append
[[[someOtherElement()]]]
])
function someOtherElement() {
var hello = document.createElement('span')
appendChildren(hello, 'hello')
var world = document.createElement('strong')
appendChildren(world, 'world')
return [hello, ' ', world]
}
Append a DOM element child
to another DOM element element
.
Append a string str
to a DOM element element
.
A Text node will be created to contain the string.
RegExps, Dates and Numbers are converted to a string using toString()
.
Append multiple things to a DOM element element
.
arr
can be an array of any of the things accepted by the other forms.
FAQs
Append things to a DOM element.
The npm package append-children receives a total of 0 weekly downloads. As such, append-children popularity was classified as not popular.
We found that append-children 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
The CNA Scorecard ranks CVE issuers by data completeness, revealing major gaps in patch info and software identifiers across thousands of vulnerabilities.
Research
/Security News
Two npm packages masquerading as WhatsApp developer libraries include a kill switch that deletes all files if the phone number isn’t whitelisted.
Research
/Security News
Socket uncovered 11 malicious Go packages using obfuscated loaders to fetch and execute second-stage payloads via C2 domains.