Socket
Socket
Sign inDemoInstall

@esbuild-plugins/node-globals-polyfill

Package Overview
Dependencies
1
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

@esbuild-plugins/node-globals-polyfill


Version published
Weekly downloads
551K
decreased by-13.24%
Maintainers
1
Install size
103 kB
Created
Weekly downloads
 

Package description

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

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc