Socket
Book a DemoInstallSign in
Socket

@storybook/instrumenter

Package Overview
Dependencies
Maintainers
12
Versions
1246
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@storybook/instrumenter

8.6.14
latest
Source
npmnpm
Version published
Weekly downloads
3.5M
-19.91%
Maintainers
12
Weekly downloads
 
Created

What is @storybook/instrumenter?

The @storybook/instrumenter package is part of the Storybook ecosystem, designed to help developers instrument their code for interaction testing and debugging within the Storybook UI. It provides utilities to track and manipulate function calls, enabling more interactive and dynamic story creation.

What are @storybook/instrumenter's main functionalities?

Code Instrumentation

This feature allows developers to wrap their functions with instrumentation logic, which enables tracking and controlling the execution of these functions within Storybook's UI. The code sample shows how to instrument a simple function to log its execution.

import { instrument } from '@storybook/instrumenter';

const originalFunction = () => { console.log('Original function execution'); };
const instrumentedFunction = instrument(originalFunction, 'uniqueKey');
instrumentedFunction();

Interaction Tracking

Enables the tracking of function calls, which can be viewed and manipulated in Storybook's interaction panel. This is useful for debugging and understanding component behaviors during development.

import { track } from '@storybook/instrumenter';

const trackedFunction = track(() => { console.log('Function called'); }, 'trackedFunction');
trackedFunction();

Other packages similar to @storybook/instrumenter

Keywords

storybook

FAQs

Package last updated on 16 May 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

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.