summaryrefslogtreecommitdiff
path: root/tools/eslint/node_modules/lodash/_toArrayLikeObject.js
blob: be01dabc7b11bdba80806bbafd9410218e54d386 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
var isArrayLikeObject = require('./isArrayLikeObject');

/**
 * Converts `value` to an array-like object if it's not one.
 *
 * @private
 * @param {*} value The value to process.
 * @returns {Array} Returns the array-like object.
 */
function toArrayLikeObject(value) {
  return isArrayLikeObject(value) ? value : [];
}

module.exports = toArrayLikeObject;