0.1.5 • Published 10 years ago

decoratejs v0.1.5

Weekly downloads
21
License
-
Repository
-
Last release
10 years ago

decorate

Decorate is a small library for providing simple utilities to decorate objects and create interfaces.

Build Status

Installation

Install with npm:

npm install --save decorate

API

decoratejs

decoratejs.createinterface('methodA', 'methodB', ...)

Creates an object with methods with names from the Array of strings provided as input. Returns an object with said methods, and an implementation that raises an 'UnimplementedException' with the same name as that of the method.

decoratejs.loggable(obj)

Creates a new object that is returned which adds a log on every invocation for all functions in the input object.

decoratejs.profilable(obj)

Creates a new object that is returned which adds a log of time taken for every invocation for all functions in the input object.

Testing

From the repo root:

npm install
npm test
0.1.5

10 years ago

0.1.4

10 years ago

0.1.3

10 years ago

0.1.2

10 years ago

0.1.1

10 years ago

0.1.0

10 years ago

0.0.0

11 years ago