Files
lodash/internal/toObject.js
John-David Dalton 81e41ca0c8 Bump to v3.9.0.
2015-12-16 17:50:42 -08:00

16 lines
330 B
JavaScript

define(['../lang/isObject'], function(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);
}
return toObject;
});