Skip to content

vertexbz/context-proxy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

context-proxy

context-proxy traps calls in exactly the same way as normal js Proxy, but this context of every trap will be context parameter of constructor or function call.

Usage

import CProxy from 'context-proxy';

const target = {}; // proxy target

const context = {/* context */};


const proxy = CProxy(target, {/* handlers */}, context);
// or with new operator
const proxy = new CProxy(target, {/* handlers */}, context);

About

JS Proxy with context.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published