Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

build-url-ts

Package Overview
Dependencies
Maintainers
1
Versions
305
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

build-url-ts - npm Package Compare versions

Comparing version 6.1.1 to 6.1.2

3

dist/build-url.d.ts

@@ -12,4 +12,5 @@ export declare type IQueryParams = Record<string, null | undefined | string | number | string[] | (string | number)[]>;

}
declare function buildUrl(url?: string | null | IUrlOptions, options?: IUrlOptions): any;
declare function buildUrl(url?: string | null | IUrlOptions, options?: IUrlOptions): string;
export { buildUrl };
export default buildUrl;
//# sourceMappingURL=build-url.d.ts.map

@@ -1,2 +0,2 @@

"use strict";function buildQueryString(r,n,a){var o=[];for(var t in r)!function(t){var e;Object.prototype.hasOwnProperty.call(r,t)&&void 0!==r[t]&&(a&&Array.isArray(r[t])&&r[t].length?r[t].forEach(function(r){e=0!==r?r||"":0,o.push("".concat(t,"=").concat(encodeURIComponent(String(e).trim())))}):(e=n?String(r[t]).toLowerCase()||"":0!==r[t]?r[t]||"":0,o.push("".concat(t,"=").concat(encodeURIComponent(String(e).trim())))))}(t);return"?".concat(o.join("&"))}function appendPath(r,t,e){"/"===t[t.length-1]&&(t=t.slice(0,-1));var n=String(r).trim();return e&&(n=n.toLowerCase()),0===n.indexOf("/")?t+=n:t+="/".concat(n),t}function buildHash(r,t){var e="#".concat(String(r).trim());return t?e.toLowerCase():e}function buildUrl(r,t){var e;return null===r?e="":"object"==typeof r?(e="",t=r):e=r,null!=t&&t.path&&(e=appendPath(t.path,e,t.lowerCase)),null!=t&&t.queryParams&&(e+=buildQueryString(t.queryParams,t.lowerCase,t.disableCSV)),null!=t&&t.hash&&(e+=buildHash(t.hash,t.lowerCase)),e}Object.defineProperty(exports,"__esModule",{value:!0}),exports.appendPath=appendPath,exports.buildHash=buildHash,exports.buildQueryString=buildQueryString,exports.default=buildUrl;
"use strict";function buildQueryString(r,n,a){var o=[];for(var t in r)!function(t){var e;Object.prototype.hasOwnProperty.call(r,t)&&void 0!==r[t]&&(a&&Array.isArray(r[t])&&r[t].length?r[t].forEach(function(r){e=0!==r?r||"":0,o.push("".concat(t,"=").concat(encodeURIComponent(String(e).trim())))}):(e=n?String(r[t]).toLowerCase()||"":0!==r[t]?r[t]||"":0,o.push("".concat(t,"=").concat(encodeURIComponent(String(e).trim())))))}(t);return"?".concat(o.join("&"))}function appendPath(r,t,e){"/"===t[t.length-1]&&(t=t.slice(0,-1));var n=String(r).trim();return e&&(n=n.toLowerCase()),0===n.indexOf("/")?t+=n:t+="/".concat(n),t}function buildHash(r,t){var e="#".concat(String(r).trim());return t?e.toLowerCase():e}function buildUrl(r,t){var e;return null===r?e="":"object"==typeof r?(e="",t=r):e=r,null!=t&&t.path&&(e=appendPath(t.path,e,t.lowerCase)),null!=t&&t.queryParams&&(e+=buildQueryString(t.queryParams,t.lowerCase,t.disableCSV)),null!=t&&t.hash&&(e+=buildHash(t.hash,t.lowerCase)),e}Object.defineProperty(exports,"__esModule",{value:!0}),exports.appendPath=appendPath,exports.buildHash=buildHash,exports.buildQueryString=buildQueryString,exports.buildUrl=buildUrl,exports.default=buildUrl;
//# sourceMappingURL=build-url.js.map
{
"name": "build-url-ts",
"version": "6.1.1",
"version": "6.1.2",
"description": "A small library that builds a URL given its components",

@@ -53,3 +53,3 @@ "main": "./dist/build-url.js",

"@rollup/plugin-typescript": "8.3.0",
"@types/eslint": "8.2.0",
"@types/eslint": "8.2.1",
"@types/jasmine": "3.10.2",

@@ -60,5 +60,5 @@ "@types/jest": "27.0.3",

"@typescript-eslint/parser": "5.5.0",
"eslint": "8.3.0",
"eslint": "8.4.0",
"eslint-config-prettier": "8.3.0",
"jest": "27.4.2",
"jest": "27.4.3",
"prettier": "2.5.0",

@@ -65,0 +65,0 @@ "rollup": "2.60.2",

# build-url-ts ( Typescript )
[![Build Status](https://github.com/meabed/build-url-ts/actions/workflows/ci.yml/badge.svg)](https://github.com/meabed/build-url-ts/actions/workflows/ci.yml)
[![NPM version](https://img.shields.io/npm/v/build-url-ts.svg)](https://www.npmjs.com/package/build-url-ts)
[![Build Status](https://travis-ci.org/meabed/build-url.svg?branch=master)](https://travis-ci.org/meabed/build-url)
A library that builds a URL, including its path, query parameters and fragment identifier. Works in node and in the browser.

@@ -22,3 +22,3 @@

```
import buildUrl from 'build-url-ts';
import { buildUrl } from 'build-url-ts';

@@ -25,0 +25,0 @@ buildUrl('http://example.com', {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc