Skip to content

Utility decorators in JavaScript: read-only, lazy-initialization, etc.

Notifications You must be signed in to change notification settings

zhiqipan/demo-core-decorators

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Utility decorators in JavaScript: read-only, lazy-initialization, etc.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published