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

Package Sidebar

Install

npm i return-this

Weekly Downloads

3

Version

1.0.2

License

MIT

Last publish

Collaborators

  • tjmehta