@infotorg/winston-log-formats
Version:
Infotorg log formats for Winston logger
11 lines (9 loc) • 313 B
JavaScript
/**
* Checks if a variable an object created using object literal '{}' or 'new Object()'.
* All other JS objects will return false.
*
* @param {*} variable
* @returns {boolean}
*/
const isObject = (variable) => Object.prototype.toString.call(variable) === '[object Object]';
module.exports = { isObject };