blob: eb89b8fe4210a9cffc99e6baf17af2db84cc8438 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
"use strict";
module.exports = function is_bool(mixedVar) {
// eslint-disable-line camelcase
// discuss at: http://locutus.io/php/is_bool/
// original by: Onno Marsman (https://twitter.com/onnomarsman)
// improved by: CoursesWeb (http://www.coursesweb.net/)
// example 1: is_bool(false)
// returns 1: true
// example 2: is_bool(0)
// returns 2: false
return mixedVar === true || mixedVar === false; // Faster (in FF) than type checking
};
//# sourceMappingURL=is_bool.js.map
|