@slipmatio/toolbelt
Advanced tools
Comparing version 0.4.1 to 0.5.0
# Changelog | ||
## 0.5.0 (2024-12-01) | ||
- Feat: added new tools: `isValidSecureUrl`, `prefetchImages`, `browserIsIE`, `browserIsSupported` and `isString` type helper. | ||
- Fix: added checks for running in SSR mode. | ||
## 0.4.1 (2024-11-27) | ||
@@ -4,0 +9,0 @@ |
@@ -0,1 +1,2 @@ | ||
import { LocationQueryValue } from 'vue-router'; | ||
import { Router } from 'vue-router'; | ||
@@ -9,2 +10,4 @@ | ||
export declare function isString(value: string | LocationQueryValue[]): value is string; | ||
export { } |
@@ -1,2 +0,11 @@ | ||
function r(o) { | ||
function r() { | ||
try { | ||
return typeof window > "u" && typeof document > "u"; | ||
} catch { | ||
return !0; | ||
} | ||
} | ||
function i(o) { | ||
if (r()) | ||
return !1; | ||
let t; | ||
@@ -17,3 +26,5 @@ o === "localStorage" ? t = window.localStorage : t = window.sessionStorage; | ||
} | ||
function i(o) { | ||
function u(o) { | ||
if (r()) | ||
return null; | ||
let t = ""; | ||
@@ -33,2 +44,4 @@ if (document.cookie && document.cookie !== "") { | ||
function l(o) { | ||
if (r()) | ||
return !1; | ||
const t = document; | ||
@@ -44,4 +57,4 @@ try { | ||
l as copyToClipboard, | ||
i as getCookie, | ||
r as storageAvailable | ||
u as getCookie, | ||
i as storageAvailable | ||
}; |
@@ -12,3 +12,4 @@ import { useRoute as n } from "vue-router"; | ||
export { | ||
o as getNextPath | ||
o as getNextPath, | ||
u as isString | ||
}; |
{ | ||
"name": "@slipmatio/toolbelt", | ||
"type": "module", | ||
"version": "0.4.1", | ||
"version": "0.5.0", | ||
"main": "dist/toolbelt.js", | ||
@@ -6,0 +6,0 @@ "module": "dist/toolbelt.js", |
@@ -11,9 +11,13 @@ # Slipmat Toolbelt | ||
- `copyToClipboard(content: string): boolean` | ||
- `getCookie(name: string): string | null` | ||
- `storageAvailable(type: 'localStorage' | 'sessionStorage'): boolean` | ||
- `browserIsIE()` | ||
- `copyToClipboard(content: string)` | ||
- `getCookie(name: string)` | ||
- `isValidSecureUrl(url: string)` | ||
- `prefetchImages(url: string|string[])` | ||
- `storageAvailable(type: 'localStorage' | 'sessionStorage')` | ||
### Vue | ||
- `getNextPath(router?: Router): string` - returns the value of `?next` query param or `/` | ||
- `getNextPath(router?: Router)` - returns the value of `?next` query param or `/` | ||
- `isString(value: string | LocationQueryValue[])` | ||
@@ -20,0 +24,0 @@ ## Installation |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
9693
102
67