sveltekit-search-params
Advanced tools
Comparing version 2.1.0 to 2.1.1
{ | ||
"name": "sveltekit-search-params", | ||
"version": "2.1.0", | ||
"version": "2.1.1", | ||
"repository": "git+https://github.com/paoloricciuti/sveltekit-search-params.git", | ||
@@ -5,0 +5,0 @@ "author": "Paolo Ricciuti", |
/* eslint-disable @typescript-eslint/no-empty-function */ | ||
/* eslint-disable @typescript-eslint/no-explicit-any */ | ||
import { browser } from '$app/environment'; | ||
import { browser, building } from '$app/environment'; | ||
import { goto } from '$app/navigation'; | ||
import { page } from '$app/stores'; | ||
import { derived, get, writable, } from 'svelte/store'; | ||
import { page as page_store } from '$app/stores'; | ||
import { derived, get, writable, readable, } from 'svelte/store'; | ||
import { compressToEncodedURIComponent, decompressFromEncodedURIComponent, } from './lz-string/index.js'; | ||
// during building we fake the page store with an URL with no search params | ||
// as it should be during prerendering. This allow the application to still build | ||
// and the client side behavior is still persisted after the build | ||
let page; | ||
if (building) { | ||
page = readable({ | ||
url: new URL('https://github.com/paoloricciuti/sveltekit-search-params'), | ||
}); | ||
} | ||
else { | ||
page = page_store; | ||
} | ||
const GOTO_OPTIONS = { | ||
@@ -9,0 +21,0 @@ keepFocus: true, |
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
39030
601
9