aswi2020vldc-gitlab/templetes/node_modules/lodash/_castArrayLikeObject.js @ 56f6c6df
1 | 3a515b92 | cagy | var isArrayLikeObject = require('./isArrayLikeObject'); |
---|---|---|---|
2 | |||
3 | /**
|
||
4 | * Casts `value` to an empty array if it's not an array like object.
|
||
5 | *
|
||
6 | * @private
|
||
7 | * @param {*} value The value to inspect.
|
||
8 | * @returns {Array|Object} Returns the cast array-like object.
|
||
9 | */
|
||
10 | function castArrayLikeObject(value) { |
||
11 | return isArrayLikeObject(value) ? value : []; |
||
12 | }
|
||
13 | |||
14 | module.exports = castArrayLikeObject; |