From 703e03aba33f234712206769f57717ba7d92d23d Mon Sep 17 00:00:00 2001 From: LinuxWizard42 Date: Wed, 12 Oct 2022 22:54:37 +0300 Subject: Added export_allowed file to make repository visible in cgit --- node_modules/boolean/build/lib/isBooleanable.js | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 node_modules/boolean/build/lib/isBooleanable.js (limited to 'node_modules/boolean/build/lib/isBooleanable.js') diff --git a/node_modules/boolean/build/lib/isBooleanable.js b/node_modules/boolean/build/lib/isBooleanable.js new file mode 100644 index 0000000..dee9c5d --- /dev/null +++ b/node_modules/boolean/build/lib/isBooleanable.js @@ -0,0 +1,19 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.isBooleanable = void 0; +const isBooleanable = function (value) { + switch (Object.prototype.toString.call(value)) { + case '[object String]': + return [ + 'true', 't', 'yes', 'y', 'on', '1', + 'false', 'f', 'no', 'n', 'off', '0' + ].includes(value.trim().toLowerCase()); + case '[object Number]': + return [0, 1].includes(value.valueOf()); + case '[object Boolean]': + return true; + default: + return false; + } +}; +exports.isBooleanable = isBooleanable; -- cgit v1.2.3-86-g962b