underscore-mixins2
Exports underscore with additional methods (see below).
Important!
We don't modify underscore from cache see: library-mixin-fake
install
npm install --save underscore-mixins2
usage
var _ = ;
Additional methods
_.lookup
returns value of error.responseJSON.error.message
if it exists otherwise undefined
_;
returns value of error.responseJSON.error.message
if it exists otherwise false
_;
returns value of error.responseJSON.error.message
if it exists and evaluates to true
otherwise returns 'not exists'
_
_.lookupLength
returns value of error.responseJSON.error.stack.length
if it exists otherwise 0
_;
_.deepExtend
returns object:
db: a: 1 b: 22 c: 3 ldap: 1
_;