Socket
Book a DemoInstallSign in
Socket

proxy-debug-logger

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

proxy-debug-logger

proxy logger

latest
npmnpm
Version
1.2.0
Version published
Maintainers
1
Created
Source

ProxyDebugLogger

npm version GitHub Actions Coverage MIT License

Factory to create proxy that log any method call. For debug.

Install

npm install proxy-debug-logger

Usage

import { traceMethodCalls } from 'proxy-debug-logger';

const originalObject ={
  doSomething(){},

  compute(value){
    return value * 2;
  }
}

const wrapped = traceMethodCalls(originalObject, "object-1");

wrapped.doSomething("with this");
wrapped.compute(13);

Log result


object-1 doSomething["with this"] -> undefined
object-1 compute[13] -> 26

Keywords

proxy

FAQs

Package last updated on 30 Nov 2019

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