
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
componentmanager
Advanced tools
Manage your dom nodes to initialize. ComponentManager is written in EcmaScript6, alternative your can use es5 version with bower.
Example Markup
<button class="simple-button" data-components="button">label</button>
<div data-components="button,mycomponent" data-settings='{"button": {}, "mycomponent": {}}'></div>
Run
var cm = new ComponentManager();
// setup properties before start detection
cm.setup({PROPERTY:VALUE});
cm
// require event, will triggerd after found components
.on('AddComponent', function (event) {
// EXAMPLE with Systemjs loader and flightjs components
return System
.import(event.path)
.then(function (pack) {
return pack.default;
})
.then(function (component) => {
var componentNode = component.attachTo(event.node, event.setting);
});
})
// detect start by document as root
.detect(document)
// promise interface after done make the next step
.then(function (nodes) {
// all component found and initialize
});
All handling based on promises objects, after detection you can play with a ready system. Each function return a valid value it follow the fluid code conzept
(default 'components/') prefixed script paths could be empty script
(default 'data-components') detection attribute of nodes
(default 'data-settings') optional attribute for setting definition(JSON script)
(default ',') used for multi definition if components Example: data-components="comp1,comp2"
listener registration @param eventName @param callback @returns {ComponentManager}
setup manager by map @param setting @returns {ComponentManager}
return all component nodes in root @param root @returns {NodeList}
return all nodes that implement the component @param componentName @param root @returns {NodeList}
detect all components in root @param root @returns {Promise}
Will trigger after detection and parsing all information for this component Event data has information about this component { node = DOM Node name = component name, path = path to component, setting = detected setting }
FAQs
Manage your enviroment nodes
We found that componentmanager 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
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.