New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

thin-trap

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

thin-trap

Thin ES6 Proxy Wrapper for Better Transparency

latest
Source
npmnpm
Version
0.0.2
Version published
Maintainers
1
Created
Source

npm Bower

thin-trap

Thin ES6 Proxy Wrapper for Better Transparency (experimental)

window.XMLHttpRequest = trap(window.XMLHttpRequest,
  function loggerForwarder(trapName, args, target, outerProxy, thisArg, proxyForThis) {
    console.log('trap:', trapName, args,
      'for', (typeof target === 'function' ? target.name : target),
      'thisArg', (thisArg && thisArg.name ? thisArg.name : thisArg));
    return Reflect[trapName](...args);
  }
);

Install

Browsers

  bower install --save thin-trap

NodeJS

  npm install --save thin-trap

Import

Browsers

  <script src="path/to/bower_components/thin-trap/trap.js"></script>

NodeJS

const trap = require('thin-trap/trap.js');

API

TBD

License

BSD-2-Clause

Keywords

proxy

FAQs

Package last updated on 17 Jan 2017

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