Skip to content

Commit 530d080

Browse files
committed
Updated doc.Bumped version.
1 parent 4c07a2d commit 530d080

2 files changed

Lines changed: 23 additions & 11 deletions

File tree

README.md

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[![Build Status](https://travis-ci.org/CocktailJS/cocktail-trait-advisable.svg?branch=master)](https://travis-ci.org/CocktailJS/cocktail-trait-advisable)
2-
[![NPM version](https://badge.fury.io/js/cocktail-trait-advisable.png)](http://badge.fury.io/js/cocktail-trait-advisable)
2+
[![npm version](https://badge.fury.io/js/cocktail-trait-advisable.svg)](http://badge.fury.io/js/cocktail-trait-advisable)
33

44
# cocktail-trait-advisable
55

@@ -83,13 +83,16 @@ this will be called after!
8383

8484
The following methods will be publicly available on the host class:
8585

86-
- `after(methodName, adviceFunction)`: Adds the adviceFunction to be called after the method.
86+
- `after( methodName, adviceFunction, [scope] )`: Adds the adviceFunction to be called after the method.
8787
- **methodName** {String}: The method name in the host class.
88-
- **adviceFunction** {Function}: the function to be called. It receives the same parameters as the method.
89-
- `before(methodName, adviceFunction)`: Adds the adviceFunction to be called before the method.
88+
- **adviceFunction** {String|Function}: the function or the name of the function to be called. It receives the same parameters as the method.
89+
- **scope** {Object} the scope to execute the adviceFunction. Optional.
90+
- `before( methodName, adviceFunction, [scope] )`: Adds the adviceFunction to be called before the method.
9091
- **methodName** {String}: The method name in the host class.
91-
- **adviceFunction** {Function}: the function to be called. It receives the same parameters as the method.
92-
- `around(methodName, adviceFunction)`: Adds the adviceFunction to be called around the method.
92+
- **adviceFunction** {String|Function}: the function or the name of the function to be called. It receives the same parameters as the method.
93+
- **scope** {Object} the scope to execute the adviceFunction. Optional.
94+
- `around( methodName, adviceFunction, [scope] )`: Adds the adviceFunction to be called around the method.
9395
- **methodName** {String}: The method name in the host class.
94-
- **adviceFunction** {Function}: the function to be called. It receives the method as the first parameter and then same parameters.
95-
96+
- **adviceFunction** {String|Function}: the function or the name of the function to be called. It receives the method as the first parameter and then same parameters.
97+
- **scope** {Object} the scope to execute the adviceFunction. Optional.
98+

package.json

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "cocktail-trait-advisable",
3-
"version": "1.0.0",
4-
"description": "",
3+
"version": "1.0.1",
4+
"description": "A CocktailJS Trait Extension to add AOP methods to the host class",
55
"main": "src/Advisable",
66
"scripts": {
77
"test": "grunt test"
@@ -32,5 +32,14 @@
3232
"sinon-chai": "~2.3.1",
3333
"sinon": "~1.6.0",
3434
"grunt-cli": "~0.1.9"
35-
}
35+
},
36+
"keywords": [
37+
"aop",
38+
"trait",
39+
"cocktail",
40+
"after",
41+
"before",
42+
"around",
43+
"advice"
44+
]
3645
}

0 commit comments

Comments
 (0)