Socket
Socket
Sign inDemoInstall

@contrast/esm-hooks

Package Overview
Dependencies
Maintainers
14
Versions
67
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@contrast/esm-hooks

Support for loading and instrumenting ECMAScript modules


Version published
Weekly downloads
24K
increased by1.9%
Maintainers
14
Weekly downloads
 
Created
Source

Using ECMAScript Modules (ESM)

NOTE: ECMAScript instrumentation is experimental and Contrast requires at least Node version 14.15.0 for support.

ECMAScript modules are the new official standard format to package JavaScript code for reuse. ES Modules are loaded with the import module from 'module' syntax.

When instrumenting an application that utilizes ECMAScript Modules, use the following method to start the application. This is the appropriate method for instrumenting an application that uses CJS, ESM, or a combination of both.

    Usage: node --experimental-loader @contrast/protect/lib/esm-loader.mjs app-main.mjs -- [app arguments]

    Options:

        -h, --help               output usage information
        -V, --version            output the version number
        -c, --configFile <path>  path to agent config file

FAQs

Package last updated on 13 Jun 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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc