build-url-ts
Advanced tools
Comparing version 6.1.6-beta.252 to 6.1.6-beta.253
@@ -13,5 +13,5 @@ export type IQueryParams = Record<string, null | undefined | string | number | string[] | (string | number)[]>; | ||
} | ||
declare function buildUrl(url?: string | null | IUrlOptions, options?: IUrlOptions): string | undefined; | ||
declare function buildUrl(url?: string | null | IUrlOptions, options?: IUrlOptions): string; | ||
export { buildUrl }; | ||
export default buildUrl; | ||
//# sourceMappingURL=index.d.ts.map |
@@ -1,2 +0,2 @@ | ||
!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n((e="undefined"!=typeof globalThis?globalThis:e||self).buildUrl={})}(this,function(e){"use strict";function o(e,r,c){var a=[];for(var n in e)!function(n){var t,o;Object.prototype.hasOwnProperty.call(e,n)&&void 0!==e[n]&&(Array.isArray(e[n])&&e[n].length?c?(o="order_desc"===c?e[n].length-1:0,e[n].forEach(function(e){switch(t=0!==e?e||"":0,c){case"array":a.push("".concat(n,"[]=").concat(encodeURIComponent(String(t).trim())));break;case"order_asc":a.push("".concat(n,"[").concat(o++,"]=").concat(encodeURIComponent(String(t).trim())));break;case"order_desc":a.push("".concat(n,"[").concat(o--,"]=").concat(encodeURIComponent(String(t).trim())));break;default:a.push("".concat(n,"=").concat(encodeURIComponent(String(t).trim())))}})):(t=e[n].map(function(e){return encodeURIComponent(String(0!==e?e||"":0).trim())}),a.push("".concat(n,"=").concat(encodeURIComponent(String(t).trim())))):(t=r?String(e[n]).toLowerCase()||"":0!==e[n]?e[n]||"":0,a.push("".concat(n,"=").concat(encodeURIComponent(String(t).trim())))))}(n);return"?".concat(a.join("&"))}function r(e,n,t){void 0===n&&(n=""),"/"===n[n.length-1]&&(n=n.slice(0,-1));var o=String(e).trim();return t&&(o=o.toLowerCase()),0===o.indexOf("/")?n+=o:n+="/".concat(o),n}function c(e,n){var t="#".concat(String(e).trim());return n?t.toLowerCase():t}function n(e,n){var t;return null===e?t="":"object"==typeof e?(t="",n=e):t=e,null!=n&&n.path&&(t=r(n.path,t,n.lowerCase)),null!=n&&n.queryParams&&(t+=o(n.queryParams,n.lowerCase,n.disableCSV)),null!=n&&n.hash&&(t+=c(n.hash,n.lowerCase)),t}e.appendPath=r,e.buildHash=c,e.buildQueryString=o,e.buildUrl=n,e.default=n,Object.defineProperty(e,"__esModule",{value:!0})}); | ||
!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n((e="undefined"!=typeof globalThis?globalThis:e||self).buildUrl={})}(this,function(e){"use strict";function o(e,r,c){var a=[];for(var n in e)!function(n){var t,o;Object.prototype.hasOwnProperty.call(e,n)&&void 0!==e[n]&&(Array.isArray(e[n])&&e[n].length?c?(o="order_desc"===c?e[n].length-1:0,e[n].forEach(function(e){switch(t=0!==e?e||"":0,c){case"array":a.push("".concat(n,"[]=").concat(encodeURIComponent(String(t).trim())));break;case"order_asc":a.push("".concat(n,"[").concat(o++,"]=").concat(encodeURIComponent(String(t).trim())));break;case"order_desc":a.push("".concat(n,"[").concat(o--,"]=").concat(encodeURIComponent(String(t).trim())));break;default:a.push("".concat(n,"=").concat(encodeURIComponent(String(t).trim())))}})):(t=e[n].map(function(e){return encodeURIComponent(String(0!==e?e||"":0).trim())}),a.push("".concat(n,"=").concat(encodeURIComponent(String(t).trim())))):(t=r?String(e[n]).toLowerCase()||"":0!==e[n]?e[n]||"":0,a.push("".concat(n,"=").concat(encodeURIComponent(String(t).trim())))))}(n);return"?".concat(a.join("&"))}function r(e,n,t){void 0===n&&(n=""),"/"===n[n.length-1]&&(n=n.slice(0,-1));var o=String(e).trim();return t&&(o=o.toLowerCase()),0===o.indexOf("/")?n+=o:n+="/".concat(o),n}function c(e,n){var t="#".concat(String(e).trim());return n?t.toLowerCase():t}function n(e,n){var t;return null===e?t="":"object"==typeof e?(t="",n=e):t=e||"",null!=n&&n.path&&(t=r(n.path,t,n.lowerCase)),null!=n&&n.queryParams&&(t+=o(n.queryParams,n.lowerCase,n.disableCSV)),null!=n&&n.hash&&(t+=c(n.hash,n.lowerCase)),t}e.appendPath=r,e.buildHash=c,e.buildQueryString=o,e.buildUrl=n,e.default=n,Object.defineProperty(e,"__esModule",{value:!0})}); | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "build-url-ts", | ||
"version": "6.1.6-beta.252", | ||
"version": "6.1.6-beta.253", | ||
"description": "A small library that builds a URL given its components", | ||
@@ -51,3 +51,3 @@ "keywords": [ | ||
"build:prod": "NODE_ENV=production rollup -c rollup.config.mjs", | ||
"lint-js": "eslint src/**/*.ts", | ||
"lint": "eslint src/**/*.ts", | ||
"prepublishOnly": "rm -rf dist/* && NODE_ENV=production rollup -c rollup.config.mjs", | ||
@@ -66,4 +66,3 @@ "prettier": "prettier --write '**/*.{ts,tsx,css,scss}'", | ||
"@types/jest": "29.5.12", | ||
"@typescript-eslint/eslint-plugin": "8.4.0", | ||
"@typescript-eslint/parser": "8.4.0", | ||
"typescript-eslint": "8.5.0", | ||
"eslint": "9.10.0", | ||
@@ -77,4 +76,4 @@ "eslint-config-prettier": "9.1.0", | ||
"tslib": "2.7.0", | ||
"typescript": "5.5.4" | ||
"typescript": "5.6.2" | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
17
12741