diff options
Diffstat (limited to 'node_modules/locutus/php/var/is_bool.js')
-rw-r--r-- | node_modules/locutus/php/var/is_bool.js | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/node_modules/locutus/php/var/is_bool.js b/node_modules/locutus/php/var/is_bool.js new file mode 100644 index 0000000..eb89b8f --- /dev/null +++ b/node_modules/locutus/php/var/is_bool.js @@ -0,0 +1,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
\ No newline at end of file |