@locator/shared
Advanced tools
Comparing version 0.1.2 to 0.1.3
@@ -27,2 +27,3 @@ export * from "./types"; | ||
}): string; | ||
export declare function detectSvelte(): boolean; | ||
export declare type SourceLocation = { | ||
@@ -29,0 +30,0 @@ start: { |
@@ -39,1 +39,10 @@ export * from "./types"; | ||
} | ||
export function detectSvelte() { | ||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment | ||
// @ts-ignore | ||
if (window.__SVELTE_HMR) { | ||
// __SVELTE_HMR is so far the only way to detect svelte I found | ||
return true; | ||
} | ||
return false; | ||
} |
{ | ||
"name": "@locator/shared", | ||
"version": "0.1.2", | ||
"version": "0.1.3", | ||
"main": "./dist/index.js", | ||
@@ -18,3 +18,3 @@ "license": "MIT", | ||
}, | ||
"gitHead": "2168e6ca3246548a392148a4c113c4757f265177", | ||
"gitHead": "496da1f7c2e458861650c667fdd4c2296af9a0dc", | ||
"files": [ | ||
@@ -21,0 +21,0 @@ "dist", |
@@ -54,2 +54,11 @@ export * from "./types"; | ||
export function detectSvelte() { | ||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment | ||
// @ts-ignore | ||
if (window.__SVELTE_HMR) { | ||
// __SVELTE_HMR is so far the only way to detect svelte I found | ||
return true; | ||
} | ||
return false; | ||
} | ||
export type SourceLocation = { | ||
@@ -56,0 +65,0 @@ start: { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
37144
1217