sveltekit-search-params
Advanced tools
Comparing version 0.1.4 to 0.1.5
{ | ||
"name": "sveltekit-search-params", | ||
"version": "0.1.4", | ||
"version": "0.1.5", | ||
"repository": "git+https://github.com/paoloricciuti/sveltekit-search-params.git", | ||
@@ -23,3 +23,3 @@ "author": "Paolo Ricciuti", | ||
"devDependencies": { | ||
"@sveltejs/adapter-auto": "next", | ||
"@sveltejs/adapter-static": "^1.0.0-next.47", | ||
"@sveltejs/kit": "next", | ||
@@ -34,3 +34,5 @@ "@sveltejs/package": "next", | ||
"svelte-check": "^2.7.1", | ||
"svelte-material-icons": "^2.0.4", | ||
"svelte-preprocess": "^4.10.6", | ||
"svelte-typewriter-store": "^0.0.5", | ||
"tslib": "^2.3.1", | ||
@@ -37,0 +39,0 @@ "typescript": "^4.7.4", |
@@ -77,3 +77,3 @@ /* eslint-disable @typescript-eslint/no-empty-function */ | ||
const setRef = { value: noop }; | ||
page.subscribe(($page) => { | ||
const unsubPage = page.subscribe(($page) => { | ||
_set(mixSearchAndOptions($page?.url?.searchParams, options)); | ||
@@ -100,2 +100,9 @@ setRef.value = (value) => { | ||
}); | ||
const sub = (...props) => { | ||
const unsub = subscribe(...props); | ||
return () => { | ||
unsub(); | ||
unsubPage(); | ||
}; | ||
}; | ||
return { | ||
@@ -105,3 +112,3 @@ set: (value) => { | ||
}, | ||
subscribe, | ||
subscribe: sub, | ||
update | ||
@@ -117,3 +124,3 @@ }; | ||
const setRef = { value: noop }; | ||
page.subscribe(($page) => { | ||
const unsubPage = page.subscribe(($page) => { | ||
_set(decode($page?.url?.searchParams?.get?.(name))); | ||
@@ -134,2 +141,9 @@ setRef.value = (value) => { | ||
}); | ||
const sub = (...props) => { | ||
const unsub = subscribe(...props); | ||
return () => { | ||
unsub(); | ||
unsubPage(); | ||
}; | ||
}; | ||
return { | ||
@@ -139,5 +153,5 @@ set: (value) => { | ||
}, | ||
subscribe, | ||
subscribe: sub, | ||
update | ||
}; | ||
} |
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
18591
211
16