Bump @justinribeiro/lite-youtube from 0.9.0 to 0.9.1 in /build/javascript (#273)
* Commit updated Javascript packages * Bump preact from 10.5.4 to 10.5.5 in /build/javascript (#265) * Trying a new github workflow to install javascript packages * Bump tailwindcss from 1.9.2 to 1.9.4 in /build/javascript (#266) Bumps [tailwindcss](https://github.com/tailwindlabs/tailwindcss) from 1.9.2 to 1.9.4. - [Release notes](https://github.com/tailwindlabs/tailwindcss/releases) - [Changelog](https://github.com/tailwindlabs/tailwindcss/blob/master/CHANGELOG.md) - [Commits](https://github.com/tailwindlabs/tailwindcss/compare/v1.9.2...v1.9.4) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Commit updated Javascript packages * Bump preact from 10.5.4 to 10.5.5 in /build/javascript Bumps [preact](https://github.com/preactjs/preact) from 10.5.4 to 10.5.5. - [Release notes](https://github.com/preactjs/preact/releases) - [Commits](https://github.com/preactjs/preact/compare/10.5.4...10.5.5) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: Gabe Kangas <gabek@real-ity.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Owncast <owncast@owncast.online> * Bump @justinribeiro/lite-youtube in /build/javascript Bumps [@justinribeiro/lite-youtube](https://github.com/justinribeiro/lite-youtube) from 0.9.0 to 0.9.1. - [Release notes](https://github.com/justinribeiro/lite-youtube/releases) - [Commits](https://github.com/justinribeiro/lite-youtube/commits) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: Owncast <owncast@owncast.online> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Gabe Kangas <gabek@real-ity.com>
This commit is contained in:
91
build/javascript/node_modules/url-toolkit/README.md
generated
vendored
Normal file
91
build/javascript/node_modules/url-toolkit/README.md
generated
vendored
Normal file
@@ -0,0 +1,91 @@
|
||||
[](https://badge.fury.io/js/url-toolkit)
|
||||
[](https://travis-ci.org/tjenkinson/url-toolkit)
|
||||
|
||||
# URL Toolkit
|
||||
|
||||
Lightweight library to build an absolute URL from a base URL and a relative URL, written from [the spec (RFC 1808)](https://tools.ietf.org/html/rfc1808). Initially part of [HLS.JS](https://github.com/dailymotion/hls.js).
|
||||
|
||||
## Methods
|
||||
|
||||
### `buildAbsoluteURL(baseURL, relativeURL, opts={})`
|
||||
|
||||
Build an absolute URL from a relative and base one.
|
||||
|
||||
```javascript
|
||||
URLToolkit.buildAbsoluteURL('http://a.com/b/cd', 'e/f/../g'); // => http://a.com/b/e/g
|
||||
```
|
||||
|
||||
If you want to ensure that the URL is treated as a relative one you should prefix it with `./`.
|
||||
|
||||
```javascript
|
||||
URLToolkit.buildAbsoluteURL('http://a.com/b/cd', 'a:b'); // => a:b
|
||||
URLToolkit.buildAbsoluteURL('http://a.com/b/cd', './a:b'); // => http://a.com/b/a:b
|
||||
```
|
||||
|
||||
By default the paths will not be normalized unless necessary, according to the spec. However you can ensure paths are always normalized by setting the `opts.alwaysNormalize` option to `true`.
|
||||
|
||||
```javascript
|
||||
URLToolkit.buildAbsoluteURL('http://a.com/b/cd', '/e/f/../g'); // => http://a.com/e/f/../g
|
||||
URLToolkit.buildAbsoluteURL('http://a.com/b/cd', '/e/f/../g', {
|
||||
alwaysNormalize: true,
|
||||
}); // => http://a.com/e/g
|
||||
```
|
||||
|
||||
### `normalizePath(url)`
|
||||
|
||||
Normalizes a path.
|
||||
|
||||
```javascript
|
||||
URLToolkit.normalizePath('a/b/../c'); // => a/c
|
||||
```
|
||||
|
||||
### `parseURL(url)`
|
||||
|
||||
Parse a URL into its separate components.
|
||||
|
||||
```javascript
|
||||
URLToolkit.parseURL('http://a/b/c/d;p?q#f'); // =>
|
||||
/* {
|
||||
scheme: 'http:',
|
||||
netLoc: '//a',
|
||||
path: '/b/c/d',
|
||||
params: ';p',
|
||||
query: '?q',
|
||||
fragment: '#f'
|
||||
} */
|
||||
```
|
||||
|
||||
### `buildURLFromParts(parts)`
|
||||
|
||||
Puts all the parts from `parseURL()` back together into a string.
|
||||
|
||||
## Example
|
||||
|
||||
```javascript
|
||||
var URLToolkit = require('url-toolkit');
|
||||
var url = URLToolkit.buildAbsoluteURL(
|
||||
'https://a.com/b/cd/e.m3u8?test=1#something',
|
||||
'../z.ts?abc=1#test'
|
||||
);
|
||||
console.log(url); // 'https://a.com/b/z.ts?abc=1#test'
|
||||
```
|
||||
|
||||
## Browser
|
||||
|
||||
This can also be used in the browser thanks to [jsDelivr](https://github.com/jsdelivr/jsdelivr):
|
||||
|
||||
```html
|
||||
<head>
|
||||
<script
|
||||
type="text/javascript"
|
||||
src="https://cdn.jsdelivr.net/npm/url-toolkit@2"
|
||||
></script>
|
||||
<script type="text/javascript">
|
||||
var url = URLToolkit.buildAbsoluteURL(
|
||||
'https://a.com/b/cd/e.m3u8?test=1#something',
|
||||
'../z.ts?abc=1#test'
|
||||
);
|
||||
console.log(url); // 'https://a.com/b/z.ts?abc=1#test'
|
||||
</script>
|
||||
</head>
|
||||
```
|
||||
Reference in New Issue
Block a user