normalize-url 7.0.1 → 7.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.d.ts +1 -1
- package/package.json +1 -1
- package/readme.md +2 -1
package/index.d.ts
CHANGED
|
@@ -226,7 +226,7 @@ export interface Options {
|
|
|
226
226
|
//=> 'http://sindresorhus.com/foo'
|
|
227
227
|
```
|
|
228
228
|
*/
|
|
229
|
-
readonly removeDirectoryIndex?: ReadonlyArray<RegExp | string>;
|
|
229
|
+
readonly removeDirectoryIndex?: boolean | ReadonlyArray<RegExp | string>;
|
|
230
230
|
|
|
231
231
|
/**
|
|
232
232
|
Sorts the query parameters alphabetically by key.
|
package/package.json
CHANGED
package/readme.md
CHANGED
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
|
|
5
5
|
Useful when you need to display, store, deduplicate, sort, compare, etc, URLs.
|
|
6
6
|
|
|
7
|
+
**Note:** This package does **not** do URL sanitization. [Garbage in, garbage out.](https://en.wikipedia.org/wiki/Garbage_in,_garbage_out) If you use this in a server context and accept URLs as user input, it's up to you to protect against invalid URLs, [path traversal attacks](https://owasp.org/www-community/attacks/Path_Traversal), etc.
|
|
8
|
+
|
|
7
9
|
## Install
|
|
8
10
|
|
|
9
11
|
```
|
|
@@ -240,7 +242,6 @@ normalizeUrl('https://sindresorhus.com/', {removeSingleSlash: false});
|
|
|
240
242
|
//=> 'https://sindresorhus.com/'
|
|
241
243
|
```
|
|
242
244
|
|
|
243
|
-
|
|
244
245
|
##### removeDirectoryIndex
|
|
245
246
|
|
|
246
247
|
Type: `boolean | Array<RegExp | string>`\
|