UNPKG

101

Version:

common javascript utils that can be required selectively that assume es5+

15 lines (13 loc) 325 B
/** * @module 101/is-boolean */ /** * Functional version of val typeof 'boolean' * @function module:101/is-boolean * @param {*} val - value checked to be a boolean * @return {boolean} Whether the value is a boolean or not */ module.exports = isBoolean; function isBoolean (val) { return typeof val === 'boolean'; }