ls-lodash
v2.2.3
Published
lodash with some extra fixins (mixins)
Downloads
98
Readme
ls-lodash
Usage
var _ = require('ls-lodash'),
merged = _.safeMerge({},{});
API
currySeal
_.currySeal(func, maxArgs)
Arguments
func
(Function) The function to curry and sealmaxArgs
(Number) Max number of total args to applyfunc
with (also arity)
Returns
(Object): Returns a new object with keys/properties of the results of each callback
execution.
mapKeys
_.mapKeys(object, [callback], [thisArg])
Arguments
object
(...Object) The object over which to iterate.[callback]
(Function) The function called per iteration.[thisArg]
(*) Thethis
binding ofcallback
Returns
(Object): Returns a new object with keys/properties of the results of each callback
execution.
Notes
Similar to _.mapValues
See https://lodash.com/docs#mapValues
safeMerge
_.safeMerge([source], [callback], [thisArg])
Arguments
[source]
(...Object) The source objects[callback]
(Function) The function to customize merging properties[thisArg]
(*) Thethis
binding ofcallback
Returns
(Object): Returns a new object with source objects merged
Notes
Effectively equivalent to _.partial(_.merge, {})
;
See https://lodash.com/docs#merge
seal
_.seal(fn, [prefixArgs], maxArgs, [suffixArgs], [thisArg])
Arguments
fn
(Function) The function to partially apply and seal.[prefixArgs]
(Array) Arguments to be partially applied left.maxArgs
(Number) The number of arguments to accept into partially applied function.[suffixArgs]
(Array) Arguments to be partially applied right.[thisArg]
(*) Context in which to runfn
Returns
(Function) Partially applied function, optionally bound to thisArg
, that accepts a max of count
more args.
qFilter
Async q-based version of _.filter
_.qFilter(collection, predicateFn, [thisArg])
Arguments
collection
(Array|Object) The collection to asynchronously filterpredicateFn
(Function) Function which returns a promise that resolves to a boolean[thisArg]
(Object) Thethis
binding ofpredicateFn
Returns
(Promise) Promise which resolves to the filtered array (just as lodash would perform the filter)