Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
component-as-module
Advanced tools
Readme
It allows you to require components from node programs.
Lookup algorithm is slightly different
from component/builder.js
in that it does not respect .paths
field from component.json
.
Require stand-alone component (with all dependencies in a ./components
dir):
var component = require('component-as-module')
var min = component('/path-to/component-min')
Setup loader:
var boot = component('boot', function(loader) {
// add lookup paths
loader.addLookup('./components')
// enable dev dependencies
loader.development()
// register node module as a component
loader.register('foo', require)
})
Alternative way to require components is to create a special "require" function:
var req = component.createRequire(function(loader) {
loader.addLookup('components')
})
var min = req('component-min')
This differs in that all loaded components are preserved
between calls, so, for example, requiring component-min
the second time is fast and
you get the same instance.
with npm
npm install component-as-module
To run tests
npm install -d
npm test
There is also component-npm-post-install script which can be used to make component package compatible with npm.
MIT
FAQs
Require components from node programs
The npm package component-as-module receives a total of 6 weekly downloads. As such, component-as-module popularity was classified as not popular.
We found that component-as-module 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
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.