New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@esbuild-plugins/node-globals-polyfill

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@esbuild-plugins/node-globals-polyfill

0.2.3
latest
Source
npm
Version published
Weekly downloads
994K
-7.6%
Maintainers
1
Weekly downloads
 
Created

What is @esbuild-plugins/node-globals-polyfill?

@esbuild-plugins/node-globals-polyfill is an npm package that provides polyfills for Node.js global variables and modules, making it easier to use Node.js-specific code in environments like the browser where these globals are not natively available.

What are @esbuild-plugins/node-globals-polyfill's main functionalities?

Buffer Polyfill

This feature provides a polyfill for the Node.js Buffer global, allowing you to use Buffer in environments where it is not natively available, such as the browser.

const { Buffer } = require('buffer');
const buf = Buffer.from('Hello, world!', 'utf-8');
console.log(buf.toString('hex'));

Process Polyfill

This feature provides a polyfill for the Node.js process global, enabling you to use process-related functionalities in non-Node.js environments.

const process = require('process');
console.log(`Current working directory: ${process.cwd()}`);

Global Polyfill

This feature provides a polyfill for the Node.js global object, allowing you to define and access global variables in environments where the global object is not natively available.

global.myGlobalVar = 'Hello, global!';
console.log(global.myGlobalVar);

Other packages similar to @esbuild-plugins/node-globals-polyfill

FAQs

Package last updated on 27 Jan 2023

Did you know?

Socket

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.

Install

Related posts