mirror of
https://github.com/atlanticbiomedical/biomedjs.git
synced 2025-07-02 00:47:26 -04:00
15 lines
309 B
JavaScript
15 lines
309 B
JavaScript
![]() |
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;
|