Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@contrast/fn-inspect

Package Overview
Dependencies
Maintainers
17
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@contrast/fn-inspect

Retrieve function name and line number from a function reference

  • 3.2.0
  • Source
  • npm
  • Socket score

Version published
Maintainers
17
Created
Source

@contrast/fn-inspect

Test

This module exposes some useful information from the underlying v8 engine, including:

  • file and line number given a function reference
  • code events (i.e. 'LAZY_COMPILE')

Usage

Getting details about a function:

const { funcInfo } = require('@contrast/fn-inspect');

function testFn() {}

const results = funcInfo(testFn);
// => { lineNumber: 2, file: 'example.js', method: 'testFn', type: 'Function' }

Registering a listener for code events:

const { setCodeEventListener } = require('@contrast/fn-inspect');

setCodeEventListener((event) => {
  console.log(event);
});

Building locally

npm run build will build the project for your current OS and architecture.

npm run download will pull the most recent build artifacts from GitHub.

Publishing

Simply run npm version and git push && git push --tags. CI will take care of releasing on taggedcommits.

Keywords

FAQs

Package last updated on 26 Aug 2022

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