MCPcopy Create free account
hub / github.com/OpenEndedGroup/Field2 / lodash

Function lodash

lib/web/jshint.js:2405–2415  ·  view source on GitHub ↗

* Creates a `lodash` object which wraps `value` to enable implicit chaining. * Methods that operate on and return arrays, collections, and functions can * be chained together. Methods that return a boolean or single value will * automatically end the chain returning the unwrapped valu

(value)

Source from the content-addressed store, hash-verified

2403 * // => true
2404 */
2405 function lodash(value) {
2406 if (isObjectLike(value) && !isArray(value) && !(value instanceof LazyWrapper)) {
2407 if (value instanceof LodashWrapper) {
2408 return value;
2409 }
2410 if (hasOwnProperty.call(value, '__chain__') && hasOwnProperty.call(value, '__wrapped__')) {
2411 return wrapperClone(value);
2412 }
2413 }
2414 return new LodashWrapper(value);
2415 }
2416
2417 /**
2418 * The function whose prototype all chaining wrappers inherit from.

Callers 1

chainFunction · 0.85

Calls 4

isObjectLikeFunction · 0.85
wrapperCloneFunction · 0.85
isArrayFunction · 0.70
callMethod · 0.45

Tested by

no test coverage detected