
Security News
Browserslist-rs Gets Major Refactor, Cutting Binary Size by Over 1MB
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.
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 98 weekly downloads. As such, browserify-extract-registry popularity was classified as not 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
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.
Research
Security News
Eight new malicious Firefox extensions impersonate games, steal OAuth tokens, hijack sessions, and exploit browser permissions to spy on users.
Security News
The official Go SDK for the Model Context Protocol is in development, with a stable, production-ready release expected by August 2025.