Socket
Book a DemoInstallSign in
Socket

@1ib/probe

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@1ib/probe

A utility to track property access and method call paths

1.0.0
latest
Source
npmnpm
Version published
Weekly downloads
1
-50%
Maintainers
1
Weekly downloads
 
Created
Source

@1ib/probe

A lightweight utility for tracking property access chains, which can become whatever you want, useful for debugging and path tracing.

Usage

1. Inject the probe code into your debug console

Open this link and copy the latest code into your debug console:

// Example context you need to debug
function blackBox(p) {
  return p.a.b.c(1, 2).d[3][4];
}

// 1. Copy the code from https://cdn.jsdelivr.net/npm/@1ib/probe@latest/dist/index.umd.js and paste it here.
// ...

// 2. Inject the probe into the context you want to debug
blackBox(probe); // Logs: probe.a.b.c.(1, 2).d.3.4

2. For project usage via npm

# Using npm
npm install @1ib/probe
import Probe from '@1ib/probe';

const probe = new Probe({ callback: console.log });
probe.a.b.c(1, 2).d;
// Logs: ['a']
// Logs: ['a', 'b']
// Logs: ['a', 'b', 'c']
// Logs: ['a', 'b', 'c', [1, 2]]
// Logs: ['a', 'b', 'c', [1, 2], 'd']

API

new Probe(options?)

Creates a new instance of the probe.

Options

  • callback: A function that is called with the current path array (default: console.info)

Use Cases

  • Debugging complex chained calls
  • Tracing property access paths
  • Building fluent APIs
  • Inspecting object traversal

License

MIT

Keywords

debug

FAQs

Package last updated on 24 Apr 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.