avancement planning
This commit is contained in:
+13
-4
@@ -1,13 +1,9 @@
|
||||
# fast-uri
|
||||
|
||||
<div align="center">
|
||||
|
||||
[](https://www.npmjs.com/package/fast-uri)
|
||||
[](https://github.com/fastify/fast-uri/actions/workflows/ci.yml)
|
||||
[](https://github.com/neostandard/neostandard)
|
||||
|
||||
</div>
|
||||
|
||||
Dependency-free RFC 3986 URI toolbox.
|
||||
|
||||
## Usage
|
||||
@@ -16,6 +12,8 @@ Dependency-free RFC 3986 URI toolbox.
|
||||
|
||||
All of the above functions can accept an additional options argument that is an object that can contain one or more of the following properties:
|
||||
|
||||
Malformed authorities and out-of-range ports are reported through the parsed component's `error` field. `normalize()` leaves malformed string inputs unchanged, and `equal()` returns `false` when either string input is malformed.
|
||||
|
||||
* `scheme` (string)
|
||||
Indicates the scheme that the URI should be treated as, overriding the URI's normal scheme parsing behavior.
|
||||
|
||||
@@ -70,6 +68,17 @@ uri.resolve("uri://a/b/c/d?q", "../../g")
|
||||
"uri://a/g"
|
||||
```
|
||||
|
||||
### Normalize
|
||||
|
||||
```js
|
||||
const uri = require('fast-uri')
|
||||
uri.normalize('http://example.com/a%2Fb')
|
||||
// Output
|
||||
"http://example.com/a%2Fb"
|
||||
```
|
||||
|
||||
Reserved path escapes such as `%2F` and `%2E` are preserved as path data during normalization and comparison.
|
||||
|
||||
### Equal
|
||||
|
||||
```js
|
||||
|
||||
Reference in New Issue
Block a user