This package has been deprecated

Author message:

This component is deprecated

@advanced-rest-client/url-parser
TypeScript icon, indicating that this package has built-in type declarations

3.1.0 • Public • Published

Build Status

A URL parsing library for Advanced REST Client.

It provides an interface similar to the URL class but it is more relax in terms of input validitiy. It means that it won't throw an error when the URL is invalid. This allows to use the library in request editors.

Usage

Installation

npm install --save @advanced-rest-client/url-parser

Example

import { UrlParser } from '@advanced-rest-client/url-parser';
const parser = new UrlParser('https:///path-with-missing-host?qury=value#string');
console.log(parser.protocol);
console.log(parser.host);
console.log(parser.path);
console.log(parser.searchParams);
console.log(parser.anchor);

Development

git clone https://github.com/advanced-rest-client/url-parser
cd url-parser
npm install

Running the tests

npm test

Package Sidebar

Install

npm i @advanced-rest-client/url-parser

Weekly Downloads

4

Version

3.1.0

License

Apache-2.0

Unpacked Size

50 kB

Total Files

13

Last publish

Collaborators

  • carowright
  • jarrodek
  • twoplustwoone
  • lbauret