{"_id":"@1ib/probe","name":"@1ib/probe","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"@1ib/probe","version":"1.0.0","description":"A utility to track property access and method call paths","main":"dist/index.umd.js","module":"dist/index.mjs","repository":{"type":"git","url":"git+https://github.com/1ib/probe.git"},"scripts":{"build":"vite build","test":"node --import tsx --test **/*.test.ts","prepublishOnly":"npm run build"},"keywords":["debug","trace","proxy","probe"],"author":{"name":"kingcc"},"license":"MIT","devDependencies":{"@types/node":"^22.14.1","tsx":"^4.19.3","vite":"^4.4.0"},"publishConfig":{"access":"public"},"dependencies":{"lodash-es":"^4.17.21"},"_id":"@1ib/probe@1.0.0","gitHead":"b06835df201f76710ca15c061ecacdbc00834340","bugs":{"url":"https://github.com/1ib/probe/issues"},"homepage":"https://github.com/1ib/probe#readme","_nodeVersion":"20.19.0","_npmVersion":"10.8.2","dist":{"integrity":"sha512-awZI5s9BJ5mIUogYpRncyV7pY8ZwQzzkHVK1z/Zzpn1YuWdDU0oVnEnKiWeztnM6VbWTUl5BIPjt1ad2uIg8gA==","shasum":"5b0aa826e768c0e6ed8a925ff5e52da86e1ae940","tarball":"https://registry.npmjs.org/@1ib/probe/-/probe-1.0.0.tgz","fileCount":7,"unpackedSize":55970,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@1ib%2fprobe@1.0.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIAgDGJw64C9afEShHNCksnYJuqfR8D9wBcYZOwaCF2QOAiBtij74hDcJKVhaLTNJdp9x7Jb0MP5xjldxhYR2GkWKTw=="}]},"_npmUser":{"name":"kingcc","email":"someone@mail.com"},"directories":{},"maintainers":[{"name":"kingcc","email":"someone@mail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/probe_1.0.0_1745484788934_0.2841847470144596"},"_hasShrinkwrap":false}},"time":{"created":"2025-04-24T08:53:08.844Z","1.0.0":"2025-04-24T08:53:09.160Z","modified":"2025-04-24T08:53:09.730Z"},"maintainers":[{"name":"kingcc","email":"someone@mail.com"}],"description":"A utility to track property access and method call paths","homepage":"https://github.com/1ib/probe#readme","keywords":["debug","trace","proxy","probe"],"repository":{"type":"git","url":"git+https://github.com/1ib/probe.git"},"author":{"name":"kingcc"},"bugs":{"url":"https://github.com/1ib/probe/issues"},"license":"MIT","readme":"# @1ib/probe\n\nA lightweight utility for tracking property access chains, which can become whatever you want, useful for debugging and path tracing.\n\n## Usage\n\n### 1. Inject the probe code into your debug console\n\nOpen [this link](https://cdn.jsdelivr.net/npm/@1ib/probe@latest/dist/index.umd.js) and copy the latest code into your debug console:\n\n```js\n// Example context you need to debug\nfunction blackBox(p) {\n  return p.a.b.c(1, 2).d[3][4];\n}\n\n// 1. Copy the code from https://cdn.jsdelivr.net/npm/@1ib/probe@latest/dist/index.umd.js and paste it here.\n// ...\n\n// 2. Inject the probe into the context you want to debug\nblackBox(probe); // Logs: probe.a.b.c.(1, 2).d.3.4\n```\n\n### 2. For project usage via npm\n\n```bash\n# Using npm\nnpm install @1ib/probe\n```\n\n```typescript\nimport Probe from '@1ib/probe';\n\nconst probe = new Probe({ callback: console.log });\nprobe.a.b.c(1, 2).d;\n// Logs: ['a']\n// Logs: ['a', 'b']\n// Logs: ['a', 'b', 'c']\n// Logs: ['a', 'b', 'c', [1, 2]]\n// Logs: ['a', 'b', 'c', [1, 2], 'd']\n```\n\n## API\n\n### `new Probe(options?)`\n\nCreates a new instance of the probe.\n\n#### Options\n\n- `callback`: A function that is called with the current path array (default: `console.info`)\n\n## Use Cases\n\n- Debugging complex chained calls\n- Tracing property access paths\n- Building fluent APIs\n- Inspecting object traversal\n\n## License\n\nMIT ","readmeFilename":"README.md","_rev":"1-3fc300617e9e7bd27ae42df107f1554e"}