@garfish/utils
Advanced tools
Comparing version 1.0.2 to 1.0.3
@@ -58,3 +58,3 @@ // src/utils.ts | ||
} | ||
} catch (e) { | ||
} catch { | ||
fn(error2, typeof error2 === "string"); | ||
@@ -96,3 +96,3 @@ } | ||
const values = keys.map((k) => `window.${randomValKey}.${k}`); | ||
const contextKey = "__garfish__exec_temporary__context__"; | ||
const contextKey = "__garfish_exec_temporary_context__"; | ||
try { | ||
@@ -131,3 +131,7 @@ nativeWindow[randomValKey] = params; | ||
function toBoolean(val) { | ||
return val === "false" ? false : Boolean(val); | ||
if (val === "") | ||
return true; | ||
if (val === "false") | ||
return false; | ||
return Boolean(val); | ||
} | ||
@@ -134,0 +138,0 @@ function remove(list, el) { |
@@ -121,3 +121,3 @@ var GarfishUtils = (() => { | ||
} | ||
} catch (e) { | ||
} catch { | ||
fn(error2, typeof error2 === "string"); | ||
@@ -159,3 +159,3 @@ } | ||
const values = keys.map((k) => `window.${randomValKey}.${k}`); | ||
const contextKey = "__garfish__exec_temporary__context__"; | ||
const contextKey = "__garfish_exec_temporary_context__"; | ||
try { | ||
@@ -194,3 +194,7 @@ nativeWindow[randomValKey] = params; | ||
function toBoolean(val) { | ||
return val === "false" ? false : Boolean(val); | ||
if (val === "") | ||
return true; | ||
if (val === "false") | ||
return false; | ||
return Boolean(val); | ||
} | ||
@@ -197,0 +201,0 @@ function remove(list, el) { |
@@ -122,3 +122,3 @@ var __defProp = Object.defineProperty; | ||
} | ||
} catch (e) { | ||
} catch { | ||
fn(error2, typeof error2 === "string"); | ||
@@ -160,3 +160,3 @@ } | ||
const values = keys.map((k) => `window.${randomValKey}.${k}`); | ||
const contextKey = "__garfish__exec_temporary__context__"; | ||
const contextKey = "__garfish_exec_temporary_context__"; | ||
try { | ||
@@ -195,3 +195,7 @@ nativeWindow[randomValKey] = params; | ||
function toBoolean(val) { | ||
return val === "false" ? false : Boolean(val); | ||
if (val === "") | ||
return true; | ||
if (val === "false") | ||
return false; | ||
return Boolean(val); | ||
} | ||
@@ -198,0 +202,0 @@ function remove(list, el) { |
{ | ||
"name": "@garfish/utils", | ||
"version": "1.0.2", | ||
"version": "1.0.3", | ||
"description": "utils module.", | ||
@@ -30,3 +30,3 @@ "keywords": [ | ||
"devDependencies": { | ||
"@garfish/core": "1.0.2" | ||
"@garfish/core": "1.0.3" | ||
}, | ||
@@ -33,0 +33,0 @@ "publishConfig": { |
113649
3366