proxy-class

0.0.1 • Public • Published

proxy-class

A Proxy Class for wrapping javascript/coffeescript classes and adding functionality.

Example:

class LogProxy extends Proxy wrap: -> console.log("Calling #{@name}") super

class A constructor: -> @property = 'world'

hello: -> @property

_A = new LogProxy(A)

a = new _A # outputs 'Calling constructor' a.hello() # outputs 'Calling hello', returns 'world'

Dependencies (0)

    Dev Dependencies (0)

      Package Sidebar

      Install

      npm i proxy-class

      Weekly Downloads

      1

      Version

      0.0.1

      License

      MIT

      Last publish

      Collaborators

      • wkf