* 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)
| 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. |
no test coverage detected