@wordpress/url 4.26.1-next.719a03cbe.0 → 4.27.1-next.46f643fa0.0
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/CHANGELOG.md +2 -0
- package/README.md +12 -12
- package/build/add-query-args.js +4 -4
- package/build/add-query-args.js.map +1 -1
- package/build/build-query-string.js +3 -3
- package/build/build-query-string.js.map +1 -1
- package/build/clean-for-slug.js +2 -2
- package/build/clean-for-slug.js.map +1 -1
- package/build/filter-url-for-display.js +3 -3
- package/build/filter-url-for-display.js.map +1 -1
- package/build/get-authority.js +2 -2
- package/build/get-authority.js.map +1 -1
- package/build/get-filename.js +2 -2
- package/build/get-filename.js.map +1 -1
- package/build/get-fragment.js +2 -2
- package/build/get-fragment.js.map +1 -1
- package/build/get-path-and-query-string.js +2 -2
- package/build/get-path-and-query-string.js.map +1 -1
- package/build/get-path.js +2 -2
- package/build/get-path.js.map +1 -1
- package/build/get-protocol.js +2 -2
- package/build/get-protocol.js.map +1 -1
- package/build/get-query-arg.js +3 -11
- package/build/get-query-arg.js.map +1 -1
- package/build/get-query-args.js +5 -11
- package/build/get-query-args.js.map +1 -1
- package/build/get-query-string.js +2 -2
- package/build/get-query-string.js.map +1 -1
- package/build/has-query-arg.js +3 -3
- package/build/has-query-arg.js.map +1 -1
- package/build/index.js.map +1 -1
- package/build/is-email.js +2 -2
- package/build/is-email.js.map +1 -1
- package/build/is-phone-number.js +2 -2
- package/build/is-phone-number.js.map +1 -1
- package/build/is-url.js +2 -2
- package/build/is-url.js.map +1 -1
- package/build/is-valid-authority.js +2 -2
- package/build/is-valid-authority.js.map +1 -1
- package/build/is-valid-fragment.js +2 -2
- package/build/is-valid-fragment.js.map +1 -1
- package/build/is-valid-path.js +2 -2
- package/build/is-valid-path.js.map +1 -1
- package/build/is-valid-protocol.js +2 -2
- package/build/is-valid-protocol.js.map +1 -1
- package/build/is-valid-query-string.js +2 -2
- package/build/is-valid-query-string.js.map +1 -1
- package/build/normalize-path.js +2 -2
- package/build/normalize-path.js.map +1 -1
- package/build/prepend-http.js +2 -2
- package/build/prepend-http.js.map +1 -1
- package/build/prepend-https.js +2 -2
- package/build/prepend-https.js.map +1 -1
- package/build/remove-query-args.js +3 -3
- package/build/remove-query-args.js.map +1 -1
- package/build/safe-decode-uri-component.js +2 -2
- package/build/safe-decode-uri-component.js.map +1 -1
- package/build/safe-decode-uri.js +2 -2
- package/build/safe-decode-uri.js.map +1 -1
- package/build-module/add-query-args.js +4 -4
- package/build-module/add-query-args.js.map +1 -1
- package/build-module/build-query-string.js +3 -3
- package/build-module/build-query-string.js.map +1 -1
- package/build-module/clean-for-slug.js +2 -2
- package/build-module/clean-for-slug.js.map +1 -1
- package/build-module/filter-url-for-display.js +3 -3
- package/build-module/filter-url-for-display.js.map +1 -1
- package/build-module/get-authority.js +2 -2
- package/build-module/get-authority.js.map +1 -1
- package/build-module/get-filename.js +2 -2
- package/build-module/get-filename.js.map +1 -1
- package/build-module/get-fragment.js +2 -2
- package/build-module/get-fragment.js.map +1 -1
- package/build-module/get-path-and-query-string.js +2 -2
- package/build-module/get-path-and-query-string.js.map +1 -1
- package/build-module/get-path.js +2 -2
- package/build-module/get-path.js.map +1 -1
- package/build-module/get-protocol.js +2 -2
- package/build-module/get-protocol.js.map +1 -1
- package/build-module/get-query-arg.js +3 -12
- package/build-module/get-query-arg.js.map +1 -1
- package/build-module/get-query-args.js +5 -12
- package/build-module/get-query-args.js.map +1 -1
- package/build-module/get-query-string.js +2 -2
- package/build-module/get-query-string.js.map +1 -1
- package/build-module/has-query-arg.js +3 -3
- package/build-module/has-query-arg.js.map +1 -1
- package/build-module/index.js.map +1 -1
- package/build-module/is-email.js +2 -2
- package/build-module/is-email.js.map +1 -1
- package/build-module/is-phone-number.js +2 -2
- package/build-module/is-phone-number.js.map +1 -1
- package/build-module/is-url.js +2 -2
- package/build-module/is-url.js.map +1 -1
- package/build-module/is-valid-authority.js +2 -2
- package/build-module/is-valid-authority.js.map +1 -1
- package/build-module/is-valid-fragment.js +2 -2
- package/build-module/is-valid-fragment.js.map +1 -1
- package/build-module/is-valid-path.js +2 -2
- package/build-module/is-valid-path.js.map +1 -1
- package/build-module/is-valid-protocol.js +2 -2
- package/build-module/is-valid-protocol.js.map +1 -1
- package/build-module/is-valid-query-string.js +2 -2
- package/build-module/is-valid-query-string.js.map +1 -1
- package/build-module/normalize-path.js +2 -2
- package/build-module/normalize-path.js.map +1 -1
- package/build-module/prepend-http.js +2 -2
- package/build-module/prepend-http.js.map +1 -1
- package/build-module/prepend-https.js +2 -2
- package/build-module/prepend-https.js.map +1 -1
- package/build-module/remove-query-args.js +3 -3
- package/build-module/remove-query-args.js.map +1 -1
- package/build-module/safe-decode-uri-component.js +2 -2
- package/build-module/safe-decode-uri-component.js.map +1 -1
- package/build-module/safe-decode-uri.js +2 -2
- package/build-module/safe-decode-uri.js.map +1 -1
- package/build-types/add-query-args.d.ts +5 -5
- package/build-types/add-query-args.d.ts.map +1 -1
- package/build-types/build-query-string.d.ts +3 -3
- package/build-types/build-query-string.d.ts.map +1 -1
- package/build-types/clean-for-slug.d.ts +3 -3
- package/build-types/clean-for-slug.d.ts.map +1 -1
- package/build-types/filter-url-for-display.d.ts +4 -4
- package/build-types/filter-url-for-display.d.ts.map +1 -1
- package/build-types/get-authority.d.ts +3 -3
- package/build-types/get-authority.d.ts.map +1 -1
- package/build-types/get-filename.d.ts +3 -3
- package/build-types/get-filename.d.ts.map +1 -1
- package/build-types/get-fragment.d.ts +3 -3
- package/build-types/get-fragment.d.ts.map +1 -1
- package/build-types/get-path-and-query-string.d.ts +3 -3
- package/build-types/get-path-and-query-string.d.ts.map +1 -1
- package/build-types/get-path.d.ts +3 -3
- package/build-types/get-path.d.ts.map +1 -1
- package/build-types/get-protocol.d.ts +3 -3
- package/build-types/get-protocol.d.ts.map +1 -1
- package/build-types/get-query-arg.d.ts +8 -14
- package/build-types/get-query-arg.d.ts.map +1 -1
- package/build-types/get-query-args.d.ts +6 -5
- package/build-types/get-query-args.d.ts.map +1 -1
- package/build-types/get-query-string.d.ts +3 -3
- package/build-types/get-query-string.d.ts.map +1 -1
- package/build-types/has-query-arg.d.ts +4 -4
- package/build-types/has-query-arg.d.ts.map +1 -1
- package/build-types/index.d.ts +28 -28
- package/build-types/index.d.ts.map +1 -1
- package/build-types/is-email.d.ts +3 -3
- package/build-types/is-email.d.ts.map +1 -1
- package/build-types/is-phone-number.d.ts +3 -3
- package/build-types/is-phone-number.d.ts.map +1 -1
- package/build-types/is-url.d.ts +3 -3
- package/build-types/is-url.d.ts.map +1 -1
- package/build-types/is-valid-authority.d.ts +3 -3
- package/build-types/is-valid-authority.d.ts.map +1 -1
- package/build-types/is-valid-fragment.d.ts +3 -3
- package/build-types/is-valid-fragment.d.ts.map +1 -1
- package/build-types/is-valid-path.d.ts +3 -3
- package/build-types/is-valid-path.d.ts.map +1 -1
- package/build-types/is-valid-protocol.d.ts +3 -3
- package/build-types/is-valid-protocol.d.ts.map +1 -1
- package/build-types/is-valid-query-string.d.ts +3 -3
- package/build-types/is-valid-query-string.d.ts.map +1 -1
- package/build-types/normalize-path.d.ts +3 -3
- package/build-types/normalize-path.d.ts.map +1 -1
- package/build-types/prepend-http.d.ts +3 -3
- package/build-types/prepend-http.d.ts.map +1 -1
- package/build-types/prepend-https.d.ts +3 -3
- package/build-types/prepend-https.d.ts.map +1 -1
- package/build-types/remove-query-args.d.ts +4 -4
- package/build-types/remove-query-args.d.ts.map +1 -1
- package/build-types/safe-decode-uri-component.d.ts +3 -3
- package/build-types/safe-decode-uri-component.d.ts.map +1 -1
- package/build-types/safe-decode-uri.d.ts +3 -3
- package/build-types/safe-decode-uri.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/{add-query-args.js → add-query-args.ts} +8 -5
- package/src/{build-query-string.js → build-query-string.ts} +7 -6
- package/src/{clean-for-slug.js → clean-for-slug.ts} +3 -3
- package/src/{filter-url-for-display.js → filter-url-for-display.ts} +7 -4
- package/src/{get-authority.js → get-authority.ts} +3 -3
- package/src/{get-filename.js → get-filename.ts} +3 -3
- package/src/{get-fragment.js → get-fragment.ts} +3 -3
- package/src/{get-path-and-query-string.js → get-path-and-query-string.ts} +3 -3
- package/src/{get-path.js → get-path.ts} +3 -3
- package/src/{get-protocol.js → get-protocol.ts} +3 -3
- package/src/get-query-arg.ts +30 -0
- package/src/{get-query-args.js → get-query-args.ts} +9 -12
- package/src/{get-query-string.js → get-query-string.ts} +3 -3
- package/src/{has-query-arg.js → has-query-arg.ts} +4 -4
- package/src/{is-email.js → is-email.ts} +3 -3
- package/src/{is-phone-number.js → is-phone-number.ts} +3 -3
- package/src/{is-url.js → is-url.ts} +3 -3
- package/src/{is-valid-authority.js → is-valid-authority.ts} +3 -3
- package/src/{is-valid-fragment.js → is-valid-fragment.ts} +3 -3
- package/src/{is-valid-path.js → is-valid-path.ts} +3 -3
- package/src/{is-valid-protocol.js → is-valid-protocol.ts} +3 -3
- package/src/{is-valid-query-string.js → is-valid-query-string.ts} +3 -3
- package/src/{normalize-path.js → normalize-path.ts} +3 -3
- package/src/{prepend-http.js → prepend-http.ts} +3 -3
- package/src/{prepend-https.js → prepend-https.ts} +3 -3
- package/src/{remove-query-args.js → remove-query-args.ts} +4 -4
- package/src/{safe-decode-uri-component.js → safe-decode-uri-component.ts} +3 -3
- package/src/{safe-decode-uri.js → safe-decode-uri.ts} +3 -3
- package/src/test/index.js +2 -2
- package/tsconfig.tsbuildinfo +1 -1
- package/src/get-query-arg.js +0 -29
- /package/src/{index.js → index.ts} +0 -0
|
@@ -7,15 +7,15 @@ import { buildQueryString } from './build-query-string';
|
|
|
7
7
|
/**
|
|
8
8
|
* Removes arguments from the query string of the url
|
|
9
9
|
*
|
|
10
|
-
* @param
|
|
11
|
-
* @param
|
|
10
|
+
* @param url URL.
|
|
11
|
+
* @param args Query Args.
|
|
12
12
|
*
|
|
13
13
|
* @example
|
|
14
14
|
* ```js
|
|
15
15
|
* const newUrl = removeQueryArgs( 'https://wordpress.org?foo=bar&bar=baz&baz=foobar', 'foo', 'bar' ); // https://wordpress.org?baz=foobar
|
|
16
16
|
* ```
|
|
17
17
|
*
|
|
18
|
-
* @return
|
|
18
|
+
* @return Updated URL.
|
|
19
19
|
*/
|
|
20
20
|
export function removeQueryArgs(url, ...args) {
|
|
21
21
|
const fragment = url.replace(/^[^#]*/, '');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["getQueryArgs","buildQueryString","removeQueryArgs","url","args","fragment","replace","queryStringIndex","indexOf","query","baseURL","substr","forEach","arg","queryString","updatedUrl"],"sources":["@wordpress/url/src/remove-query-args.
|
|
1
|
+
{"version":3,"names":["getQueryArgs","buildQueryString","removeQueryArgs","url","args","fragment","replace","queryStringIndex","indexOf","query","baseURL","substr","forEach","arg","queryString","updatedUrl"],"sources":["@wordpress/url/src/remove-query-args.ts"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport { getQueryArgs } from './get-query-args';\nimport { buildQueryString } from './build-query-string';\n\n/**\n * Removes arguments from the query string of the url\n *\n * @param url URL.\n * @param args Query Args.\n *\n * @example\n * ```js\n * const newUrl = removeQueryArgs( 'https://wordpress.org?foo=bar&bar=baz&baz=foobar', 'foo', 'bar' ); // https://wordpress.org?baz=foobar\n * ```\n *\n * @return Updated URL.\n */\nexport function removeQueryArgs( url: string, ...args: string[] ): string {\n\tconst fragment = url.replace( /^[^#]*/, '' );\n\turl = url.replace( /#.*/, '' );\n\n\tconst queryStringIndex = url.indexOf( '?' );\n\tif ( queryStringIndex === -1 ) {\n\t\treturn url + fragment;\n\t}\n\n\tconst query = getQueryArgs( url );\n\tconst baseURL = url.substr( 0, queryStringIndex );\n\targs.forEach( ( arg ) => delete query[ arg ] );\n\tconst queryString = buildQueryString( query );\n\tconst updatedUrl = queryString ? baseURL + '?' + queryString : baseURL;\n\treturn updatedUrl + fragment;\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,YAAY,QAAQ,kBAAkB;AAC/C,SAASC,gBAAgB,QAAQ,sBAAsB;;AAEvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,eAAeA,CAAEC,GAAW,EAAE,GAAGC,IAAc,EAAW;EACzE,MAAMC,QAAQ,GAAGF,GAAG,CAACG,OAAO,CAAE,QAAQ,EAAE,EAAG,CAAC;EAC5CH,GAAG,GAAGA,GAAG,CAACG,OAAO,CAAE,KAAK,EAAE,EAAG,CAAC;EAE9B,MAAMC,gBAAgB,GAAGJ,GAAG,CAACK,OAAO,CAAE,GAAI,CAAC;EAC3C,IAAKD,gBAAgB,KAAK,CAAC,CAAC,EAAG;IAC9B,OAAOJ,GAAG,GAAGE,QAAQ;EACtB;EAEA,MAAMI,KAAK,GAAGT,YAAY,CAAEG,GAAI,CAAC;EACjC,MAAMO,OAAO,GAAGP,GAAG,CAACQ,MAAM,CAAE,CAAC,EAAEJ,gBAAiB,CAAC;EACjDH,IAAI,CAACQ,OAAO,CAAIC,GAAG,IAAM,OAAOJ,KAAK,CAAEI,GAAG,CAAG,CAAC;EAC9C,MAAMC,WAAW,GAAGb,gBAAgB,CAAEQ,KAAM,CAAC;EAC7C,MAAMM,UAAU,GAAGD,WAAW,GAAGJ,OAAO,GAAG,GAAG,GAAGI,WAAW,GAAGJ,OAAO;EACtE,OAAOK,UAAU,GAAGV,QAAQ;AAC7B","ignoreList":[]}
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
* Safely decodes a URI component with `decodeURIComponent`. Returns the URI component unmodified if
|
|
3
3
|
* `decodeURIComponent` throws an error.
|
|
4
4
|
*
|
|
5
|
-
* @param
|
|
5
|
+
* @param uriComponent URI component to decode.
|
|
6
6
|
*
|
|
7
|
-
* @return
|
|
7
|
+
* @return Decoded URI component if possible.
|
|
8
8
|
*/
|
|
9
9
|
export function safeDecodeURIComponent(uriComponent) {
|
|
10
10
|
try {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["safeDecodeURIComponent","uriComponent","decodeURIComponent","uriComponentError"],"sources":["@wordpress/url/src/safe-decode-uri-component.
|
|
1
|
+
{"version":3,"names":["safeDecodeURIComponent","uriComponent","decodeURIComponent","uriComponentError"],"sources":["@wordpress/url/src/safe-decode-uri-component.ts"],"sourcesContent":["/**\n * Safely decodes a URI component with `decodeURIComponent`. Returns the URI component unmodified if\n * `decodeURIComponent` throws an error.\n *\n * @param uriComponent URI component to decode.\n *\n * @return Decoded URI component if possible.\n */\nexport function safeDecodeURIComponent( uriComponent: string ): string {\n\ttry {\n\t\treturn decodeURIComponent( uriComponent );\n\t} catch ( uriComponentError ) {\n\t\treturn uriComponent;\n\t}\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASA,sBAAsBA,CAAEC,YAAoB,EAAW;EACtE,IAAI;IACH,OAAOC,kBAAkB,CAAED,YAAa,CAAC;EAC1C,CAAC,CAAC,OAAQE,iBAAiB,EAAG;IAC7B,OAAOF,YAAY;EACpB;AACD","ignoreList":[]}
|
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
* Safely decodes a URI with `decodeURI`. Returns the URI unmodified if
|
|
3
3
|
* `decodeURI` throws an error.
|
|
4
4
|
*
|
|
5
|
-
* @param
|
|
5
|
+
* @param uri URI to decode.
|
|
6
6
|
*
|
|
7
7
|
* @example
|
|
8
8
|
* ```js
|
|
9
9
|
* const badUri = safeDecodeURI( '%z' ); // does not throw an Error, simply returns '%z'
|
|
10
10
|
* ```
|
|
11
11
|
*
|
|
12
|
-
* @return
|
|
12
|
+
* @return Decoded URI if possible.
|
|
13
13
|
*/
|
|
14
14
|
export function safeDecodeURI(uri) {
|
|
15
15
|
try {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["safeDecodeURI","uri","decodeURI","uriError"],"sources":["@wordpress/url/src/safe-decode-uri.
|
|
1
|
+
{"version":3,"names":["safeDecodeURI","uri","decodeURI","uriError"],"sources":["@wordpress/url/src/safe-decode-uri.ts"],"sourcesContent":["/**\n * Safely decodes a URI with `decodeURI`. Returns the URI unmodified if\n * `decodeURI` throws an error.\n *\n * @param uri URI to decode.\n *\n * @example\n * ```js\n * const badUri = safeDecodeURI( '%z' ); // does not throw an Error, simply returns '%z'\n * ```\n *\n * @return Decoded URI if possible.\n */\nexport function safeDecodeURI( uri: string ): string {\n\ttry {\n\t\treturn decodeURI( uri );\n\t} catch ( uriError ) {\n\t\treturn uri;\n\t}\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASA,aAAaA,CAAEC,GAAW,EAAW;EACpD,IAAI;IACH,OAAOC,SAAS,CAAED,GAAI,CAAC;EACxB,CAAC,CAAC,OAAQE,QAAQ,EAAG;IACpB,OAAOF,GAAG;EACX;AACD","ignoreList":[]}
|
|
@@ -3,16 +3,16 @@
|
|
|
3
3
|
* includes query arguments, the arguments are merged with (and take precedent
|
|
4
4
|
* over) the existing set.
|
|
5
5
|
*
|
|
6
|
-
* @param
|
|
7
|
-
*
|
|
8
|
-
* @param
|
|
6
|
+
* @param url URL to which arguments should be appended. If omitted,
|
|
7
|
+
* only the resulting querystring is returned.
|
|
8
|
+
* @param args Query arguments to apply to URL.
|
|
9
9
|
*
|
|
10
10
|
* @example
|
|
11
11
|
* ```js
|
|
12
12
|
* const newURL = addQueryArgs( 'https://google.com', { q: 'test' } ); // https://google.com/?q=test
|
|
13
13
|
* ```
|
|
14
14
|
*
|
|
15
|
-
* @return
|
|
15
|
+
* @return URL with arguments applied.
|
|
16
16
|
*/
|
|
17
|
-
export function addQueryArgs(url?: string, args?:
|
|
17
|
+
export declare function addQueryArgs(url?: string, args?: Record<string, unknown>): string;
|
|
18
18
|
//# sourceMappingURL=add-query-args.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"add-query-args.d.ts","sourceRoot":"","sources":["../src/add-query-args.
|
|
1
|
+
{"version":3,"file":"add-query-args.d.ts","sourceRoot":"","sources":["../src/add-query-args.ts"],"names":[],"mappings":"AAOA;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,YAAY,CAC3B,GAAG,GAAE,MAAW,EAChB,IAAI,CAAC,EAAE,MAAM,CAAE,MAAM,EAAE,OAAO,CAAE,GAC9B,MAAM,CAoBR"}
|
|
@@ -18,9 +18,9 @@
|
|
|
18
18
|
* // "simple=is%20ok&arrays%5B0%5D=are&arrays%5B1%5D=fine&arrays%5B2%5D=too&objects%5BevenNested%5D%5Bok%5D=yes"
|
|
19
19
|
* ```
|
|
20
20
|
*
|
|
21
|
-
* @param
|
|
21
|
+
* @param data Data to encode.
|
|
22
22
|
*
|
|
23
|
-
* @return
|
|
23
|
+
* @return Query string.
|
|
24
24
|
*/
|
|
25
|
-
export function buildQueryString(data: Record<string,
|
|
25
|
+
export declare function buildQueryString(data: Record<string, unknown>): string;
|
|
26
26
|
//# sourceMappingURL=build-query-string.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build-query-string.d.ts","sourceRoot":"","sources":["../src/build-query-string.
|
|
1
|
+
{"version":3,"file":"build-query-string.d.ts","sourceRoot":"","sources":["../src/build-query-string.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAgB,gBAAgB,CAAE,IAAI,EAAE,MAAM,CAAE,MAAM,EAAE,OAAO,CAAE,GAAI,MAAM,CAqC1E"}
|
|
@@ -10,9 +10,9 @@
|
|
|
10
10
|
* except hyphens. Converts remaining string to lowercase. It does not account
|
|
11
11
|
* for octets, HTML entities, or other encoded characters.
|
|
12
12
|
*
|
|
13
|
-
* @param
|
|
13
|
+
* @param string Title or slug to be processed.
|
|
14
14
|
*
|
|
15
|
-
* @return
|
|
15
|
+
* @return Processed string.
|
|
16
16
|
*/
|
|
17
|
-
export function cleanForSlug(string: string): string;
|
|
17
|
+
export declare function cleanForSlug(string: string): string;
|
|
18
18
|
//# sourceMappingURL=clean-for-slug.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"clean-for-slug.d.ts","sourceRoot":"","sources":["../src/clean-for-slug.
|
|
1
|
+
{"version":3,"file":"clean-for-slug.d.ts","sourceRoot":"","sources":["../src/clean-for-slug.ts"],"names":[],"mappings":"AAKA;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,YAAY,CAAE,MAAM,EAAE,MAAM,GAAI,MAAM,CAqBrD"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Returns a URL for display.
|
|
3
3
|
*
|
|
4
|
-
* @param
|
|
5
|
-
* @param
|
|
4
|
+
* @param url Original URL.
|
|
5
|
+
* @param maxLength URL length.
|
|
6
6
|
*
|
|
7
7
|
* @example
|
|
8
8
|
* ```js
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* const imageUrl = filterURLForDisplay( 'https://www.wordpress.org/wp-content/uploads/img.png', 20 ); // …ent/uploads/img.png
|
|
11
11
|
* ```
|
|
12
12
|
*
|
|
13
|
-
* @return
|
|
13
|
+
* @return Displayed URL.
|
|
14
14
|
*/
|
|
15
|
-
export function filterURLForDisplay(url: string, maxLength?: number | null): string;
|
|
15
|
+
export declare function filterURLForDisplay(url: string, maxLength?: number | null): string;
|
|
16
16
|
//# sourceMappingURL=filter-url-for-display.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"filter-url-for-display.d.ts","sourceRoot":"","sources":["../src/filter-url-for-display.
|
|
1
|
+
{"version":3,"file":"filter-url-for-display.d.ts","sourceRoot":"","sources":["../src/filter-url-for-display.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,wBAAgB,mBAAmB,CAClC,GAAG,EAAE,MAAM,EACX,SAAS,GAAE,MAAM,GAAG,IAAW,GAC7B,MAAM,CA8CR"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Returns the authority part of the URL.
|
|
3
3
|
*
|
|
4
|
-
* @param
|
|
4
|
+
* @param url The full URL.
|
|
5
5
|
*
|
|
6
6
|
* @example
|
|
7
7
|
* ```js
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* const authority2 = getAuthority( 'https://localhost:8080/test/' ); // 'localhost:8080'
|
|
10
10
|
* ```
|
|
11
11
|
*
|
|
12
|
-
* @return
|
|
12
|
+
* @return The authority part of the URL.
|
|
13
13
|
*/
|
|
14
|
-
export function getAuthority(url: string): string | void;
|
|
14
|
+
export declare function getAuthority(url: string): string | void;
|
|
15
15
|
//# sourceMappingURL=get-authority.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-authority.d.ts","sourceRoot":"","sources":["../src/get-authority.
|
|
1
|
+
{"version":3,"file":"get-authority.d.ts","sourceRoot":"","sources":["../src/get-authority.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,wBAAgB,YAAY,CAAE,GAAG,EAAE,MAAM,GAAI,MAAM,GAAG,IAAI,CAOzD"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Returns the filename part of the URL.
|
|
3
3
|
*
|
|
4
|
-
* @param
|
|
4
|
+
* @param url The full URL.
|
|
5
5
|
*
|
|
6
6
|
* @example
|
|
7
7
|
* ```js
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* const filename2 = getFilename( '/this/is/a/test.png' ); // 'test.png'
|
|
10
10
|
* ```
|
|
11
11
|
*
|
|
12
|
-
* @return
|
|
12
|
+
* @return The filename part of the URL.
|
|
13
13
|
*/
|
|
14
|
-
export function getFilename(url: string): string | void;
|
|
14
|
+
export declare function getFilename(url: string): string | void;
|
|
15
15
|
//# sourceMappingURL=get-filename.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-filename.d.ts","sourceRoot":"","sources":["../src/get-filename.
|
|
1
|
+
{"version":3,"file":"get-filename.d.ts","sourceRoot":"","sources":["../src/get-filename.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,wBAAgB,WAAW,CAAE,GAAG,EAAE,MAAM,GAAI,MAAM,GAAG,IAAI,CAgBxD"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Returns the fragment part of the URL.
|
|
3
3
|
*
|
|
4
|
-
* @param
|
|
4
|
+
* @param url The full URL
|
|
5
5
|
*
|
|
6
6
|
* @example
|
|
7
7
|
* ```js
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* const fragment2 = getFragment( 'https://wordpress.org#another-fragment?query=true' ); // '#another-fragment'
|
|
10
10
|
* ```
|
|
11
11
|
*
|
|
12
|
-
* @return
|
|
12
|
+
* @return The fragment part of the URL.
|
|
13
13
|
*/
|
|
14
|
-
export function getFragment(url: string): string | void;
|
|
14
|
+
export declare function getFragment(url: string): string | void;
|
|
15
15
|
//# sourceMappingURL=get-fragment.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-fragment.d.ts","sourceRoot":"","sources":["../src/get-fragment.
|
|
1
|
+
{"version":3,"file":"get-fragment.d.ts","sourceRoot":"","sources":["../src/get-fragment.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,wBAAgB,WAAW,CAAE,GAAG,EAAE,MAAM,GAAI,MAAM,GAAG,IAAI,CAKxD"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Returns the path part and query string part of the URL.
|
|
3
3
|
*
|
|
4
|
-
* @param
|
|
4
|
+
* @param url The full URL.
|
|
5
5
|
*
|
|
6
6
|
* @example
|
|
7
7
|
* ```js
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* const pathAndQueryString2 = getPathAndQueryString( 'https://wordpress.org/help/faq/' ); // '/help/faq'
|
|
10
10
|
* ```
|
|
11
11
|
*
|
|
12
|
-
* @return
|
|
12
|
+
* @return The path part and query string part of the URL.
|
|
13
13
|
*/
|
|
14
|
-
export function getPathAndQueryString(url: string): string;
|
|
14
|
+
export declare function getPathAndQueryString(url: string): string;
|
|
15
15
|
//# sourceMappingURL=get-path-and-query-string.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-path-and-query-string.d.ts","sourceRoot":"","sources":["../src/get-path-and-query-string.
|
|
1
|
+
{"version":3,"file":"get-path-and-query-string.d.ts","sourceRoot":"","sources":["../src/get-path-and-query-string.ts"],"names":[],"mappings":"AAKA;;;;;;;;;;;;GAYG;AACH,wBAAgB,qBAAqB,CAAE,GAAG,EAAE,MAAM,GAAI,MAAM,CAW3D"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Returns the path part of the URL.
|
|
3
3
|
*
|
|
4
|
-
* @param
|
|
4
|
+
* @param url The full URL.
|
|
5
5
|
*
|
|
6
6
|
* @example
|
|
7
7
|
* ```js
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* const path2 = getPath( 'https://wordpress.org/help/faq/' ); // 'help/faq'
|
|
10
10
|
* ```
|
|
11
11
|
*
|
|
12
|
-
* @return
|
|
12
|
+
* @return The path part of the URL.
|
|
13
13
|
*/
|
|
14
|
-
export function getPath(url: string): string | void;
|
|
14
|
+
export declare function getPath(url: string): string | void;
|
|
15
15
|
//# sourceMappingURL=get-path.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-path.d.ts","sourceRoot":"","sources":["../src/get-path.
|
|
1
|
+
{"version":3,"file":"get-path.d.ts","sourceRoot":"","sources":["../src/get-path.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,wBAAgB,OAAO,CAAE,GAAG,EAAE,MAAM,GAAI,MAAM,GAAG,IAAI,CAMpD"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Returns the protocol part of the URL.
|
|
3
3
|
*
|
|
4
|
-
* @param
|
|
4
|
+
* @param url The full URL.
|
|
5
5
|
*
|
|
6
6
|
* @example
|
|
7
7
|
* ```js
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* const protocol2 = getProtocol( 'https://wordpress.org' ); // 'https:'
|
|
10
10
|
* ```
|
|
11
11
|
*
|
|
12
|
-
* @return
|
|
12
|
+
* @return The protocol part of the URL.
|
|
13
13
|
*/
|
|
14
|
-
export function getProtocol(url: string): string | void;
|
|
14
|
+
export declare function getProtocol(url: string): string | void;
|
|
15
15
|
//# sourceMappingURL=get-protocol.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-protocol.d.ts","sourceRoot":"","sources":["../src/get-protocol.
|
|
1
|
+
{"version":3,"file":"get-protocol.d.ts","sourceRoot":"","sources":["../src/get-protocol.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,wBAAgB,WAAW,CAAE,GAAG,EAAE,MAAM,GAAI,MAAM,GAAG,IAAI,CAKxD"}
|
|
@@ -1,25 +1,19 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
* @typedef {string|string[]|QueryArgObject} QueryArgParsed
|
|
6
|
-
*/
|
|
1
|
+
export interface QueryArgObject {
|
|
2
|
+
[key: string]: QueryArgParsed;
|
|
3
|
+
}
|
|
4
|
+
export type QueryArgParsed = string | string[] | QueryArgObject;
|
|
7
5
|
/**
|
|
8
6
|
* Returns a single query argument of the url
|
|
9
7
|
*
|
|
10
|
-
* @param
|
|
11
|
-
* @param
|
|
8
|
+
* @param url URL.
|
|
9
|
+
* @param arg Query arg name.
|
|
12
10
|
*
|
|
13
11
|
* @example
|
|
14
12
|
* ```js
|
|
15
13
|
* const foo = getQueryArg( 'https://wordpress.org?foo=bar&bar=baz', 'foo' ); // bar
|
|
16
14
|
* ```
|
|
17
15
|
*
|
|
18
|
-
* @return
|
|
16
|
+
* @return Query arg value.
|
|
19
17
|
*/
|
|
20
|
-
export function getQueryArg(url: string, arg: string): QueryArgParsed |
|
|
21
|
-
export type QueryArgObject = {
|
|
22
|
-
[key: string]: QueryArgParsed;
|
|
23
|
-
};
|
|
24
|
-
export type QueryArgParsed = string | string[] | QueryArgObject;
|
|
18
|
+
export declare function getQueryArg(url: string, arg: string): QueryArgParsed | undefined;
|
|
25
19
|
//# sourceMappingURL=get-query-arg.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-query-arg.d.ts","sourceRoot":"","sources":["../src/get-query-arg.
|
|
1
|
+
{"version":3,"file":"get-query-arg.d.ts","sourceRoot":"","sources":["../src/get-query-arg.ts"],"names":[],"mappings":"AAKA,MAAM,WAAW,cAAc;IAC9B,CAAE,GAAG,EAAE,MAAM,GAAI,cAAc,CAAC;CAChC;AAED,MAAM,MAAM,cAAc,GAAG,MAAM,GAAG,MAAM,EAAE,GAAG,cAAc,CAAC;AAEhE;;;;;;;;;;;;GAYG;AACH,wBAAgB,WAAW,CAC1B,GAAG,EAAE,MAAM,EACX,GAAG,EAAE,MAAM,GACT,cAAc,GAAG,SAAS,CAE5B"}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
+
import type { QueryArgParsed } from './get-query-arg';
|
|
2
|
+
type QueryArgs = Record<string, QueryArgParsed>;
|
|
1
3
|
/**
|
|
2
4
|
* Returns an object of query arguments of the given URL. If the given URL is
|
|
3
5
|
* invalid or has no querystring, an empty object is returned.
|
|
4
6
|
*
|
|
5
|
-
* @param
|
|
7
|
+
* @param url URL.
|
|
6
8
|
*
|
|
7
9
|
* @example
|
|
8
10
|
* ```js
|
|
@@ -10,9 +12,8 @@
|
|
|
10
12
|
* // { "foo": "bar", "bar": "baz" }
|
|
11
13
|
* ```
|
|
12
14
|
*
|
|
13
|
-
* @return
|
|
15
|
+
* @return Query args object.
|
|
14
16
|
*/
|
|
15
|
-
export function getQueryArgs(url: string): QueryArgs;
|
|
16
|
-
export
|
|
17
|
-
export type QueryArgs = Record<string, QueryArgParsed>;
|
|
17
|
+
export declare function getQueryArgs(url: string): QueryArgs;
|
|
18
|
+
export {};
|
|
18
19
|
//# sourceMappingURL=get-query-args.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-query-args.d.ts","sourceRoot":"","sources":["../src/get-query-args.
|
|
1
|
+
{"version":3,"file":"get-query-args.d.ts","sourceRoot":"","sources":["../src/get-query-args.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAEtD,KAAK,SAAS,GAAG,MAAM,CAAE,MAAM,EAAE,cAAc,CAAE,CAAC;AAiDlD;;;;;;;;;;;;;GAaG;AACH,wBAAgB,YAAY,CAAE,GAAG,EAAE,MAAM,GAAI,SAAS,CAyBrD"}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Returns the query string part of the URL.
|
|
3
3
|
*
|
|
4
|
-
* @param
|
|
4
|
+
* @param url The full URL.
|
|
5
5
|
*
|
|
6
6
|
* @example
|
|
7
7
|
* ```js
|
|
8
8
|
* const queryString = getQueryString( 'http://localhost:8080/this/is/a/test?query=true#fragment' ); // 'query=true'
|
|
9
9
|
* ```
|
|
10
10
|
*
|
|
11
|
-
* @return
|
|
11
|
+
* @return The query string part of the URL.
|
|
12
12
|
*/
|
|
13
|
-
export function getQueryString(url: string): string | void;
|
|
13
|
+
export declare function getQueryString(url: string): string | void;
|
|
14
14
|
//# sourceMappingURL=get-query-string.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-query-string.d.ts","sourceRoot":"","sources":["../src/get-query-string.
|
|
1
|
+
{"version":3,"file":"get-query-string.d.ts","sourceRoot":"","sources":["../src/get-query-string.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,wBAAgB,cAAc,CAAE,GAAG,EAAE,MAAM,GAAI,MAAM,GAAG,IAAI,CAS3D"}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Determines whether the URL contains a given query arg.
|
|
3
3
|
*
|
|
4
|
-
* @param
|
|
5
|
-
* @param
|
|
4
|
+
* @param url URL.
|
|
5
|
+
* @param arg Query arg name.
|
|
6
6
|
*
|
|
7
7
|
* @example
|
|
8
8
|
* ```js
|
|
9
9
|
* const hasBar = hasQueryArg( 'https://wordpress.org?foo=bar&bar=baz', 'bar' ); // true
|
|
10
10
|
* ```
|
|
11
11
|
*
|
|
12
|
-
* @return
|
|
12
|
+
* @return Whether or not the URL contains the query arg.
|
|
13
13
|
*/
|
|
14
|
-
export function hasQueryArg(url: string, arg: string): boolean;
|
|
14
|
+
export declare function hasQueryArg(url: string, arg: string): boolean;
|
|
15
15
|
//# sourceMappingURL=has-query-arg.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"has-query-arg.d.ts","sourceRoot":"","sources":["../src/has-query-arg.
|
|
1
|
+
{"version":3,"file":"has-query-arg.d.ts","sourceRoot":"","sources":["../src/has-query-arg.ts"],"names":[],"mappings":"AAKA;;;;;;;;;;;;GAYG;AACH,wBAAgB,WAAW,CAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAI,OAAO,CAE/D"}
|
package/build-types/index.d.ts
CHANGED
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
export { isURL } from
|
|
2
|
-
export { isEmail } from
|
|
3
|
-
export { isPhoneNumber } from
|
|
4
|
-
export { getProtocol } from
|
|
5
|
-
export { isValidProtocol } from
|
|
6
|
-
export { getAuthority } from
|
|
7
|
-
export { isValidAuthority } from
|
|
8
|
-
export { getPath } from
|
|
9
|
-
export { isValidPath } from
|
|
10
|
-
export { getQueryString } from
|
|
11
|
-
export { buildQueryString } from
|
|
12
|
-
export { isValidQueryString } from
|
|
13
|
-
export { getPathAndQueryString } from
|
|
14
|
-
export { getFragment } from
|
|
15
|
-
export { isValidFragment } from
|
|
16
|
-
export { addQueryArgs } from
|
|
17
|
-
export { getQueryArg } from
|
|
18
|
-
export { getQueryArgs } from
|
|
19
|
-
export { hasQueryArg } from
|
|
20
|
-
export { removeQueryArgs } from
|
|
21
|
-
export { prependHTTP } from
|
|
22
|
-
export { safeDecodeURI } from
|
|
23
|
-
export { safeDecodeURIComponent } from
|
|
24
|
-
export { filterURLForDisplay } from
|
|
25
|
-
export { cleanForSlug } from
|
|
26
|
-
export { getFilename } from
|
|
27
|
-
export { normalizePath } from
|
|
28
|
-
export { prependHTTPS } from
|
|
1
|
+
export { isURL } from './is-url';
|
|
2
|
+
export { isEmail } from './is-email';
|
|
3
|
+
export { isPhoneNumber } from './is-phone-number';
|
|
4
|
+
export { getProtocol } from './get-protocol';
|
|
5
|
+
export { isValidProtocol } from './is-valid-protocol';
|
|
6
|
+
export { getAuthority } from './get-authority';
|
|
7
|
+
export { isValidAuthority } from './is-valid-authority';
|
|
8
|
+
export { getPath } from './get-path';
|
|
9
|
+
export { isValidPath } from './is-valid-path';
|
|
10
|
+
export { getQueryString } from './get-query-string';
|
|
11
|
+
export { buildQueryString } from './build-query-string';
|
|
12
|
+
export { isValidQueryString } from './is-valid-query-string';
|
|
13
|
+
export { getPathAndQueryString } from './get-path-and-query-string';
|
|
14
|
+
export { getFragment } from './get-fragment';
|
|
15
|
+
export { isValidFragment } from './is-valid-fragment';
|
|
16
|
+
export { addQueryArgs } from './add-query-args';
|
|
17
|
+
export { getQueryArg } from './get-query-arg';
|
|
18
|
+
export { getQueryArgs } from './get-query-args';
|
|
19
|
+
export { hasQueryArg } from './has-query-arg';
|
|
20
|
+
export { removeQueryArgs } from './remove-query-args';
|
|
21
|
+
export { prependHTTP } from './prepend-http';
|
|
22
|
+
export { safeDecodeURI } from './safe-decode-uri';
|
|
23
|
+
export { safeDecodeURIComponent } from './safe-decode-uri-component';
|
|
24
|
+
export { filterURLForDisplay } from './filter-url-for-display';
|
|
25
|
+
export { cleanForSlug } from './clean-for-slug';
|
|
26
|
+
export { getFilename } from './get-filename';
|
|
27
|
+
export { normalizePath } from './normalize-path';
|
|
28
|
+
export { prependHTTPS } from './prepend-https';
|
|
29
29
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AACjC,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AACpE,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AACrE,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC"}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Determines whether the given string looks like an email.
|
|
3
3
|
*
|
|
4
|
-
* @param
|
|
4
|
+
* @param email The string to scrutinise.
|
|
5
5
|
*
|
|
6
6
|
* @example
|
|
7
7
|
* ```js
|
|
8
8
|
* const isEmail = isEmail( 'hello@wordpress.org' ); // true
|
|
9
9
|
* ```
|
|
10
10
|
*
|
|
11
|
-
* @return
|
|
11
|
+
* @return Whether or not it looks like an email.
|
|
12
12
|
*/
|
|
13
|
-
export function isEmail(email: string): boolean;
|
|
13
|
+
export declare function isEmail(email: string): boolean;
|
|
14
14
|
//# sourceMappingURL=is-email.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"is-email.d.ts","sourceRoot":"","sources":["../src/is-email.
|
|
1
|
+
{"version":3,"file":"is-email.d.ts","sourceRoot":"","sources":["../src/is-email.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;;GAWG;AACH,wBAAgB,OAAO,CAAE,KAAK,EAAE,MAAM,GAAI,OAAO,CAEhD"}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Determines whether the given string looks like a phone number.
|
|
3
3
|
*
|
|
4
|
-
* @param
|
|
4
|
+
* @param phoneNumber The string to scrutinize.
|
|
5
5
|
*
|
|
6
6
|
* @example
|
|
7
7
|
* ```js
|
|
8
8
|
* const isPhoneNumber = isPhoneNumber('+1 (555) 123-4567'); // true
|
|
9
9
|
* ```
|
|
10
10
|
*
|
|
11
|
-
* @return
|
|
11
|
+
* @return Whether or not it looks like a phone number.
|
|
12
12
|
*/
|
|
13
|
-
export function isPhoneNumber(phoneNumber: string): boolean;
|
|
13
|
+
export declare function isPhoneNumber(phoneNumber: string): boolean;
|
|
14
14
|
//# sourceMappingURL=is-phone-number.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"is-phone-number.d.ts","sourceRoot":"","sources":["../src/is-phone-number.
|
|
1
|
+
{"version":3,"file":"is-phone-number.d.ts","sourceRoot":"","sources":["../src/is-phone-number.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;GAWG;AACH,wBAAgB,aAAa,CAAE,WAAW,EAAE,MAAM,GAAI,OAAO,CAI5D"}
|
package/build-types/is-url.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Determines whether the given string looks like a URL.
|
|
3
3
|
*
|
|
4
|
-
* @param
|
|
4
|
+
* @param url The string to scrutinise.
|
|
5
5
|
*
|
|
6
6
|
* @example
|
|
7
7
|
* ```js
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
* @see https://url.spec.whatwg.org/
|
|
12
12
|
* @see https://url.spec.whatwg.org/#valid-url-string
|
|
13
13
|
*
|
|
14
|
-
* @return
|
|
14
|
+
* @return Whether or not it looks like a URL.
|
|
15
15
|
*/
|
|
16
|
-
export function isURL(url: string): boolean;
|
|
16
|
+
export declare function isURL(url: string): boolean;
|
|
17
17
|
//# sourceMappingURL=is-url.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"is-url.d.ts","sourceRoot":"","sources":["../src/is-url.
|
|
1
|
+
{"version":3,"file":"is-url.d.ts","sourceRoot":"","sources":["../src/is-url.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,KAAK,CAAE,GAAG,EAAE,MAAM,GAAI,OAAO,CAS5C"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Checks for invalid characters within the provided authority.
|
|
3
3
|
*
|
|
4
|
-
* @param
|
|
4
|
+
* @param authority A string containing the URL authority.
|
|
5
5
|
*
|
|
6
6
|
* @example
|
|
7
7
|
* ```js
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* const isNotValid = isValidAuthority( 'wordpress#org' ); // false
|
|
10
10
|
* ```
|
|
11
11
|
*
|
|
12
|
-
* @return
|
|
12
|
+
* @return True if the argument contains a valid authority.
|
|
13
13
|
*/
|
|
14
|
-
export function isValidAuthority(authority: string): boolean;
|
|
14
|
+
export declare function isValidAuthority(authority: string): boolean;
|
|
15
15
|
//# sourceMappingURL=is-valid-authority.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"is-valid-authority.d.ts","sourceRoot":"","sources":["../src/is-valid-authority.
|
|
1
|
+
{"version":3,"file":"is-valid-authority.d.ts","sourceRoot":"","sources":["../src/is-valid-authority.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,wBAAgB,gBAAgB,CAAE,SAAS,EAAE,MAAM,GAAI,OAAO,CAK7D"}
|