-
Notifications
You must be signed in to change notification settings - Fork 228
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #397 from salesforce/v5-docs-permutepath
V5 Docs - `permutePath`
- Loading branch information
Showing
3 changed files
with
73 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [tough-cookie](./tough-cookie.md) > [permutePath](./tough-cookie.permutepath.md) | ||
|
||
## permutePath() function | ||
|
||
Generates the permutation of all possible values that [pathMatch()](./tough-cookie.pathmatch.md) the `path` parameter. The array is in longest-to-shortest order. Useful when building custom [Store](./tough-cookie.store.md) implementations. | ||
|
||
**Signature:** | ||
|
||
```typescript | ||
export declare function permutePath(path: string): string[]; | ||
``` | ||
|
||
## Parameters | ||
|
||
<table><thead><tr><th> | ||
|
||
Parameter | ||
|
||
|
||
</th><th> | ||
|
||
Type | ||
|
||
|
||
</th><th> | ||
|
||
Description | ||
|
||
|
||
</th></tr></thead> | ||
<tbody><tr><td> | ||
|
||
path | ||
|
||
|
||
</td><td> | ||
|
||
string | ||
|
||
|
||
</td><td> | ||
|
||
the path to generate permutations for | ||
|
||
|
||
</td></tr> | ||
</tbody></table> | ||
**Returns:** | ||
|
||
string\[\] | ||
|
||
## Example | ||
|
||
|
||
``` | ||
permutePath('/foo/bar/') | ||
// ['/foo/bar/', '/foo/bar', '/foo', '/'] | ||
``` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters