Skip to content

Commit 6c75e76

Browse files
committed
Better overview.
1 parent 162c931 commit 6c75e76

1 file changed

Lines changed: 11 additions & 3 deletions

File tree

README.md

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,16 @@
11
# decko [![NPM Version](https://img.shields.io/npm/v/decko.svg?style=flat)](https://npmjs.com/package/decko) [![Build Status](https://travis-ci.org/developit/decko.svg?branch=master)](https://travis-ci.org/developit/decko)
22

3-
> A collection of the most useful [decorators](https://github.com/wycats/javascript-decorators).
4-
>
5-
> Works by default with Babel 5.x. To use with Babel 6+, install [transform-decorators-legacy](https://github.com/loganfsmyth/babel-plugin-transform-decorators-legacy).
3+
A concise implementation of the three most useful [decorators](https://github.com/wycats/javascript-decorators):
4+
5+
- `@bind`: make the value of `this` constant within a method
6+
- `@debounce`: throttle calls to a method
7+
- `@memoize`: cache return values based on arguments
8+
9+
Decorators help simplify code by replacing the noise of common patterns with declarative annotations.
10+
Conversely, decorators can also be overused and create obscurity.
11+
Decko establishes 3 standard decorators that are immediately recognizable, so you can avoid creating decorators in your own codebase.
12+
13+
> _**Note:** Decorators work by default with Babel 5.x. For Babel 6+, install [transform-decorators-legacy](https://github.com/loganfsmyth/babel-plugin-transform-decorators-legacy)._
614
715

816
## Installation

0 commit comments

Comments
 (0)