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

@envelop/instruments

Package Overview
Dependencies
Maintainers
0
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@envelop/instruments

This package contains utility functions and types to ease the use of instruments accross Envelop, Yoga, whatwg-node and Hive Gateway plugins.

  • 1.0.0-alpha-20250228204257-fea2ea0dbc59802cb3bf7042c0f1a473e051b44b
  • alpha
  • Source
  • npm
  • Socket score

Version published
Maintainers
0
Created
Source

@envelop/instruments

This package contains utility functions and types to ease the use of instruments accross Envelop, Yoga, whatwg-node and Hive Gateway plugins.

[!NOTE] Instruments are automatically composed together. This should only be used if the default ordering doesn't suite your need (ie. instruments and hooks should not be executed in the same order)

composeInstruments(instruments: Instruments[]): Instruments

This function composes all the instruments into one. The instruments will be called in the same order than they are in the array (first is outer most call, last is inner most).

import { getInstrumentsAndPlugins } from '@envelop/instruments'

// Extract instruments to compose from their plugins
const { instruments: instruments1, ...plugin1 } = usePlugin1()
const { instruments: instruments2, ...plugin2 } = usePlugin2()

const getEnveloped = envelop({
  plugins: [
    plugin1,
    plugin2,
    // Plugin instruments and plugin hooks will be executed in a different order
    { instruments: composeInstruments([instruments1, instruments2]) }
  ]
})

FAQs

Package last updated on 28 Feb 2025

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