UNPKG
foop
Version:
beta (5.0.0)
latest (5.0.0)
5.0.0
interfaces that describe their intentions.
github.com/fluents/chain-able
fluents/chain-able
foop
/
plugins
/
autoIncrement.js
10 lines
(9 loc)
•
245 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
/** *
@plugin
*
@param
{
Primitive
} name method name *
@param
{
Object
} parent Parent *
@return
{
MethodChain
}
@chainable
*/
module
.
exports
=
function
(
name, parent
) {
return
this
.
initial
(
0
).
onCall
(
() =>
parent.
tap
(name,
num
=>
num +
1
)) }