added so manay things

This commit is contained in:
miles committed 2026-03-17 20:39:19 -04:00
1 parent a242b40a96
commit 534e55c32d
1160 files changed
+493911 -35

No files matched your search

+20
View File
@@ -0,0 +1,20 @@
const isBooleanable = function (value: any): boolean {
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;
}
};
export { isBooleanable };