summaryrefslogtreecommitdiff
path: root/deps/npm/node_modules/cli-table2/node_modules/lodash/internal/toObject.js
blob: da4a008d7b4f12e99171b8b9976580dfb729e8a9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
var isObject = require('../lang/isObject');

/**
 * Converts `value` to an object if it's not one.
 *
 * @private
 * @param {*} value The value to process.
 * @returns {Object} Returns the object.
 */
function toObject(value) {
  return isObject(value) ? value : Object(value);
}

module.exports = toObject;