Files
biomedjs/node_modules/lodash/internal/toObject.js

15 lines
309 B
JavaScript
Raw Permalink Normal View History

2015-04-20 05:31:12 -04:00
var isObject = require('../lang/isObject');
/**
* Converts `value` to an object if it is 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;