
Security News
AI Agent Lands PRs in Major OSS Projects, Targets Maintainers via Cold Outreach
An AI agent is merging PRs into major OSS projects and cold-emailing maintainers to drum up more work.
global-wrap
Advanced tools
This library will bundle up your CommonJS code and expose it as a property of the global object. It does so using browserify, so everything ends up in one file, even any native module shims you depend on.
In essence, this is a lighter-weight alternative to browserify's built-in standalone option; it only generates the global, omitting AMD support, and boils down the API into just what's necessary to complete this one task.
This package's main module's default export is a function that takes two arguments: some options, and a callback.
The options are:
main: the file path of your main module, which you want to expose as a global.global: the name of the global you want to expose.browserifyOptions: any browserify options you want to pass along, like noparse, builtins, detectGlobals, debug, etc.tmpDir: the temporary directory to use. If this option is not specified the operating system's default directory for temp files will be used.The callback will be called with either an error or a string containing JavaScript source. This JS source will, upon being loaded into a browser, create the specified global on self, whose value will be the same as if you'd done require(options.main). Thus, it's ready for inserting into your page as a <script> tag and use by other global-using scripts.
Here's an example:
var globalWrap = require("global-wrap");
globalWrap({
main: "my-library.js",
global: "myLib",
browserifyOptions: { detectGlobals: false }
}, function (err, output) {
// handle `err`, or write `output` to a `.js` file, or something.
});
FAQs
Exposes your CommonJS-based libraries as a global.
The npm package global-wrap receives a total of 6 weekly downloads. As such, global-wrap popularity was classified as not popular.
We found that global-wrap 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
An AI agent is merging PRs into major OSS projects and cold-emailing maintainers to drum up more work.

Research
/Security News
Chrome extension CL Suite by @CLMasters neutralizes 2FA for Facebook and Meta Business accounts while exfiltrating Business Manager contact and analytics data.

Security News
After Matplotlib rejected an AI-written PR, the agent fired back with a blog post, igniting debate over AI contributions and maintainer burden.