Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
node-html-light
Advanced tools
HTML Parser for NodeJS providing a lightweight object oriented interface
HTML Parser for NodeJS providing a lightweight object oriented interface
npm i node-html-light --save
blauspecht.io uses node-html-light
to render their whole page server-side. blauspecht.io enables you to provide rich content to your followers, schedule tweets and threads and will add AI-powered features soon.
const Document = require('node-html-light').Document
const resolve = require('path').resolve
Document.fromPath(resolve('./index.html')).then((document) => {
// head is an instance of Node
const head = document.head()
// body is an instance of Node
const body = document.body()
// find child elements
// append child elements
// remove child elements
// replace child elements
return document.toHtml()
}).then((html) => {
// ..
})
const Node = require('node-html-light').Node
const resolve = require('path').resolve
Node.fromPath(resolve('partial.html')).then((node) => {})
const Node = require('node-html-light').Node
const node = Node.fromString('<div></div>')
const Node = require('node-html-light').Node
const Attributes = require('node-html-light').Attributes
const node = Node.of('meta', Attributes.of({
'name': 'viewport',
'theme-color': '#795548'
})
)
const Node = require('node-html-light').Node
const Attributes = require('node-html-light').Attributes
const resolve = require('path').resolve
Node.fromPath(resolve('partial.html')).then((node) => {
const content = node.find('div', Attributes.of({
'name': 'viewport',
'theme-color': '#795548'
}))
})
This project is distributed under the MIT license.
FAQs
HTML Parser for NodeJS providing a lightweight object oriented interface
The npm package node-html-light receives a total of 2,332 weekly downloads. As such, node-html-light popularity was classified as popular.
We found that node-html-light 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
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.