0.1.7 • Published 8 years ago

conditional-decorator v0.1.7

Weekly downloads
229
License
MIT
Repository
github
Last release
8 years ago

Conditional Decorator

npm version Build Status David Test Coverage Code Climate License

A decorator which can wrap other decorator

Installation

npm install conditional-decorator

Usage

import { conditional } from 'conditional-decorator';
import { logger } from './logger';

class Foo {
	@logger
	bar() {
		// ...
	}

	@conditional(__DEBUG__, logger)
	baz() {
		// ...
	}
}

API

You can read TypeDoc-generated documentation here

Using with TypeScript

TBD

Todo

  • Test for:
  • Object Literal Method Declaration
  • Object Literal Accessor Declaration

Both are unavailable in TypeScript 1.6.2, so test should be done in Babel with es6.decorators option

0.1.7

8 years ago

0.1.6

8 years ago

0.1.5

8 years ago

0.1.4

9 years ago

0.1.3

9 years ago

0.1.2

9 years ago

0.1.0

9 years ago

0.0.1

9 years ago