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

+17
View File
@@ -0,0 +1,17 @@
const boolean = function (value: any): boolean {
switch (Object.prototype.toString.call(value)) {
case '[object String]':
return [ 'true', 't', 'yes', 'y', 'on', '1' ].includes(value.trim().toLowerCase());
case '[object Number]':
return value.valueOf() === 1;
case '[object Boolean]':
return value.valueOf();
default:
return false;
}
};
export { boolean };