1.0.2 • Published 7 years ago
return-this
A function that simply returns this
. Useful as a chainable noop stub.
Installation
npm i --save return-this
Usage
var returnThis = require('return-this')
var x = new Animal()
animal.foo = returnThis
animal.bar = returnThis
animal.foo().bar()
License
MIT