Security News
Cloudflare Adds Security.txt Setup Wizard
Cloudflare has launched a setup wizard allowing users to easily create and manage a security.txt file for vulnerability disclosure on their websites.
browserify-extract-registry
Advanced tools
Browserify plugin to extract a bundle's module-deps registry to a file.
Export a Browserify bundle's "dependency registry," a mapping of modules to their dependencies.
npm install browserify-extract-registry --save
// main.js
require('./a');
require('./b');
// a.js
require('c');
// b.js
console.log('do nothing!');
// c.js
console.log('do nothing!');
const extractRegistry = require('browserify-extract-registry');
browserify()
.add('./main.js')
.plugin(extractRegistry, {
outputFile: './registry.json'
});
This will result in a registry.json
like the following. (Note: Browserify assigns modules numeric IDs.)
{
"1": [2, 3], // "main" requires "a" and "b"
"2": [4] // "a" requires "c"
"3": [] // "b" has no deps
"4": [] // "c" has no deps
}
outputFile
- Write the registy to the specified file path.callback
- Callback. First argument is an error, and the second is the registry object.validateRegistry
- Boolean. Default: false
. Check that each module's dependency is in the registry. If not and outputFile
is set, throws error. If not and callback
is set, passes error as first argument.sortDeps
- Boolean. Default: false
. Sort each module's dependency array in the registry, allowing deterministic registries.This plugin is designed for scenarios in which you need outside access to a bundle's dependencies.
It can be used alongside browserify-splitter to compute dependencies and generate dynamic bundles at runtime.
FAQs
Browserify plugin to extract a bundle's module-deps registry to a file.
The npm package browserify-extract-registry receives a total of 1,365 weekly downloads. As such, browserify-extract-registry popularity was classified as popular.
We found that browserify-extract-registry 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
Cloudflare has launched a setup wizard allowing users to easily create and manage a security.txt file for vulnerability disclosure on their websites.
Security News
The Socket Research team breaks down a malicious npm package targeting the legitimate DOMPurify library. It uses obfuscated code to hide that it is exfiltrating browser and crypto wallet data.
Security News
ENISA’s 2024 report highlights the EU’s top cybersecurity threats, including rising DDoS attacks, ransomware, supply chain vulnerabilities, and weaponized AI.