tui-code-snippet
Version:
TOAST UI Utility: CodeSnippet
20 lines (16 loc) • 487 B
JavaScript
/**
* @fileoverview Check whether the given variable is a string or not.
* @author NHN FE Development Lab <dl_javascript@nhn.com>
*/
;
/**
* Check whether the given variable is a boolean or not.
* If the given variable is a boolean, return true.
* @param {*} obj - Target for checking
* @returns {boolean} Is boolean?
* @memberof module:type
*/
function isBoolean(obj) {
return typeof obj === 'boolean' || obj instanceof Boolean;
}
module.exports = isBoolean;