ECMAScript Proxy Examples
Examples for my JS Roundabout talk talk about the Proxy API.
intro directory contains examples of these traps:
You can run any of the below with
node <directory name>:
setIntervalregistration and clearing
fancyConsole- a Console API-compliant proxy that augments the global
consoleobject with dates and coloured output
lazyRequire- lazy loading of CommonJS dependencies
memoisation- caching the output of a function based upon its input
schemaValidation- validate object properties based upon a simple schema
There is a single dependency for the
preventXss example, so be sure to run
npm i first.