Security News
GitHub Removes Malicious Pull Requests Targeting Open Source Repositories
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
Hyper fast diffing algorithm for real DOM nodes :zap:
const nanomorph = require('nanomorph')
const html = require('bel')
var tree = html`<div>hello people</div>`
tree = nanomorph(html`<div>nanananana-na-no</div>`, tree)
tree = nanomorph(html`<div>teeny, tiny, tin bottle</div>`, tree)
const updateDom = require('nanomorph/update-dom')
const html = require('bel')
// create the initial tree, save it and append to DOM
const tree = html`<div>hello people</div>`
const update = updateDom(tree)
document.body.appendChild(tree)
// now each consecutive update will be rendered on the DOM
update(html`<div>hello people</div>`, tree)
update(html`<div>nanananana-na-no</div>`, tree)
Diff a tree of HTML elements against another tree of HTML elements and create a patched result that can be applied on the DOM.
Experimentin' is fun - all this is is a take on seeing how small we can get with real DOM node diffing. And if we can make some good heuristics happen for efficient tree updates (Merkle trees, anyone?) that'd be nice.
No, probably not but if you do it'll probably be the fastest thing ever. Seriously, I doubt this could be made a lot faster than it is right now, unless we're talking edge cases. But yeah, alright go ahead if you like.
$ npm install nanomorph
FAQs
Hyper fast diffing algorithm for real DOM nodes
The npm package nanomorph receives a total of 1,067 weekly downloads. As such, nanomorph popularity was classified as popular.
We found that nanomorph demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 29 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
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
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.