promise-preserve
Preserve the result in a promise chain.
Install
npm install --save `promise-preserve`
Usage
var preserve = ; var promise = { ;}; promise
API
preserve(fn)
preserve a function
Wraps the function so that when it is called, it does not modify the result in a promise chain.
preserve(obj, name)
preserve a method
Wraps the method so that when it is called, it will be called with the right context and it will not change the result in a promise chain.