Add more lib docs

This commit is contained in:
Jon Staab
2025-06-04 14:13:45 -07:00
parent d2d0b208ed
commit 95eae509cc
5 changed files with 147 additions and 282 deletions
+11 -13
View File
@@ -2,19 +2,7 @@
A `normalizeUrl` function borrowed from [sindresorhus/normalize-url](https://github.com/sindresorhus/normalize-url) is included for convenience.
## Basic Usage
```typescript
normalizeUrl('example')
//=> 'http://example'
normalizeUrl('sindresorhus.com/about.html#contact', {stripHash: true});
//=> 'http://sindresorhus.com/about.html'
```
## API Reference
### Configuration
## API
```typescript
export type Options = {
@@ -67,3 +55,13 @@ export type Options = {
readonly sortQueryParameters?: boolean
}
```
## Example
```typescript
normalizeUrl('example')
//=> 'http://example'
normalizeUrl('sindresorhus.com/about.html#contact', {stripHash: true});
//=> 'http://sindresorhus.com/about.html'
```