Skip to content

Latest commit

 

History

History
26 lines (19 loc) · 639 Bytes

README.md

File metadata and controls

26 lines (19 loc) · 639 Bytes

Core Decorators in JavaScript

This project is inspired by core-decorators.

Implemented for fun and learning purpose only.

Decorators

For Properties
  • @readonly
  • @lazyinit
For Methods
  • @log
  • @timer
  • @memoize
  • @decorate
  • @before
  • @afterReturning
  • @afterThrowing
  • @afterFinally
  • @around

Note: @before, @after* and @around decorators are inspired by Aspect Oriented Programming (AOP) pattern in Java

Note: Unit tests are available for all decorators, and integration tests with lodash are available for @decorate