-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathurl.ts
More file actions
32 lines (29 loc) · 1.07 KB
/
url.ts
File metadata and controls
32 lines (29 loc) · 1.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
/**
* @file Safe references to `URL`, `URLSearchParams`, and the
* `URLSearchParams.prototype` methods.
*/
import { uncurryThis } from './uncurry'
export const URLCtor: typeof URL = URL
export const URLSearchParamsCtor: typeof URLSearchParams = URLSearchParams
// ─── URLSearchParams (prototype) ───────────────────────────────────────
export const URLSearchParamsPrototypeAppend = uncurryThis(
URLSearchParams.prototype.append,
)
export const URLSearchParamsPrototypeDelete = uncurryThis(
URLSearchParams.prototype.delete,
)
export const URLSearchParamsPrototypeForEach = uncurryThis(
URLSearchParams.prototype.forEach,
)
export const URLSearchParamsPrototypeGet = uncurryThis(
URLSearchParams.prototype.get,
)
export const URLSearchParamsPrototypeGetAll = uncurryThis(
URLSearchParams.prototype.getAll,
)
export const URLSearchParamsPrototypeHas = uncurryThis(
URLSearchParams.prototype.has,
)
export const URLSearchParamsPrototypeSet = uncurryThis(
URLSearchParams.prototype.set,
)