diff options
Diffstat (limited to 'deps/npm/node_modules/lodash/internal/toObject.js')
-rw-r--r-- | deps/npm/node_modules/lodash/internal/toObject.js | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/deps/npm/node_modules/lodash/internal/toObject.js b/deps/npm/node_modules/lodash/internal/toObject.js new file mode 100644 index 0000000000..da4a008d7b --- /dev/null +++ b/deps/npm/node_modules/lodash/internal/toObject.js @@ -0,0 +1,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; |