Socket
Socket
Sign inDemoInstall

transparent

Package Overview
Dependencies
0
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    transparent

Simple, removable proxies for JavaScript methods.


Version published
Maintainers
1
Install size
6.87 kB
Created

Readme

Source

Transparent

http://github.com/transparentjs/transparent

Transparent is library for creating removable proxies for JavaScript functions. Much of it was extracted from the honorable Sinon.js, which has used these constructs to make testing spies and stubs. The proxy acts exactly like the original method in all cases. The original method can be restored by calling object.method.restore(). The returned proxy is the function object which replaced the original method. proxy === object.method.

Transparent can be used to build performance gathering proxies, logging proxies, or even generalized middleware. In this way, libraries like Sinon and Nodetime have the opportunity to build on a common proxying structure rather than creating their own mutually incompatible approaches.

Transparent subscribes to the philosophy of Component.js, and seeks to do nothing else. If you cannot use it to replace your home grown proxying library.

Keywords

FAQs

Last updated on 28 Feb 2013

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc