mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-06 17:47:49 +00:00
Bump to v3.0.0.
This commit is contained in:
15
internal/toObject.js
Normal file
15
internal/toObject.js
Normal file
@@ -0,0 +1,15 @@
|
||||
define(['../lang/isObject'], function(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);
|
||||
}
|
||||
|
||||
return toObject;
|
||||
});
|
||||
Reference in New Issue
Block a user