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.
A virtual DOM library with focus on simplicity, modularity, powerful features and performance.
A virtual DOM library with focus on simplicity, modularity, powerful features and performance.
Snabbdom consists of an extremely simple, performant and extensible core that is only ≈ 200 SLOC. It offers a modular architecture with rich functionality for extensions through custom modules. To keep the core simple all non-esential functionality is delegated to modules.
You can mold Snabbdom into whatever you want! Pick, choose and customize the functionality that you want. Alternatively you can just use the default extensions and get a virtual DOM library with high performance, small size and powerful features.
var snabbdom = require('snabbdom');
var patch = snabbdom.init([ // Init patch function with modules
require('snabbdom/modules/class'), // makes it possible to toggle classes
require('snabbdom/modules/props'), // for setting properties on DOM elements
require('snabbdom/modules/style'), // handles styles on elements
require('snabbdom/modules/eventlisteners'), // attach event listeners
]);
var h = require('snabbdom/h'); // helper function for defining VNodes
var vnode = h('div#id.two.classes', {on: {click: someFn}}, [
h('span', {style: {fontWeight: 'bold'}}, 'This is bold'),
' and this is just normal text',
h('a', {props: {href: '/foo'}, 'I\'ll take you places!'})
]);
var container = document.getElementById('container');
// Patch into empty VNode – this modifies the DOM as a side effect
patch(container, vnode);
This describes the core modules.
h('a', {class: {active: true, selected: false}}, 'Toggle');
FAQs
A virtual DOM library with focus on simplicity, modularity, powerful features and performance.
The npm package snabbdom receives a total of 0 weekly downloads. As such, snabbdom popularity was classified as not popular.
We found that snabbdom 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
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.