return-this

1.0.2 • Public • Published

return-this Build Status js-standard-style

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

/return-this/

    Package Sidebar

    Install

    npm i return-this

    Weekly Downloads

    2

    Version

    1.0.2

    License

    MIT

    Last publish

    Collaborators

    • tjmehta