svelte-guard-history-router
Advanced tools
Comparing version 2.13.0 to 2.13.1
{ | ||
"name": "svelte-guard-history-router", | ||
"version": "2.13.0", | ||
"version": "2.13.1", | ||
"publishConfig": { | ||
@@ -5,0 +5,0 @@ "access": "public" |
@@ -18,11 +18,11 @@ [![Svelte v3](https://img.shields.io/badge/svelte-v3-orange.svg)](https://svelte.dev) | ||
- Named params | ||
- Guards to act when entering / leaving a route | ||
- Automatic route ranking | ||
- Routes and keys acting as stores | ||
- Nested Routes | ||
- Route values | ||
- Object <=> parameter mapping | ||
- Create links from objects | ||
- Standart `<a href="/home">Home</a>` elements | ||
- Named params | ||
- Guards to act when entering / leaving a route | ||
- Automatic route ranking | ||
- Routes and keys acting as stores | ||
- Nested Routes | ||
- Route values | ||
- Object <=> parameter mapping | ||
- Create links from objects | ||
- Standart `<a href="/home">Home</a>` elements | ||
@@ -157,2 +157,3 @@ # usage | ||
- [Parameters](#parameters-13) | ||
- [propertyMapping](#propertymapping) | ||
- [propertiesFor](#propertiesfor) | ||
@@ -165,9 +166,9 @@ - [Parameters](#parameters-14) | ||
- [path](#path) | ||
- [route](#route) | ||
- [Parameters](#parameters-16) | ||
- [Guard](#guard) | ||
- [enter](#enter-1) | ||
- [Parameters](#parameters-16) | ||
- [leave](#leave-1) | ||
- [Parameters](#parameters-17) | ||
- [leave](#leave-1) | ||
- [Parameters](#parameters-18) | ||
- [redirectGuard](#redirectguard) | ||
- [Parameters](#parameters-18) | ||
- [sequenceGuard](#sequenceguard) | ||
@@ -409,2 +410,9 @@ - [Parameters](#parameters-19) | ||
### propertyMapping | ||
Map properties to objects attributes. | ||
Keys are the property names and values are the keys in the resulting object. | ||
Returns **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** | ||
### propertiesFor | ||
@@ -418,3 +426,3 @@ | ||
Returns **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** properties extracted from given objects | ||
Returns **([Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) \| [undefined](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/undefined))** properties extracted from given objects | ||
@@ -449,13 +457,2 @@ ### objectFor | ||
## route | ||
Helper function to create routes with optional guards | ||
### Parameters | ||
- `args` **([Guard](#guard) \| [Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)<SvelteComponent>)** last one must be a SvelteComponent | ||
- `parent` **Route?** | ||
- `path` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)?** | ||
- `factory` **Route?** | ||
## Guard | ||
@@ -482,2 +479,11 @@ | ||
## redirectGuard | ||
Redirects to a given url if condition is met | ||
### Parameters | ||
- `url` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** | ||
- `condition` **[Function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function)** redirects when returning true | ||
## sequenceGuard | ||
@@ -484,0 +490,0 @@ |
Sorry, the diff of this file is not supported yet
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
38698
540
676