parse-url-cli

3.0.3 • Public • Published

parse-url-cli

Parse a URL, get one or all components pretty-printed or as JSON. Uses whatwg-url underneath.

npm version ISC-licensed minimum Node.js version chat with me on Gitter support me via GitHub Sponsors

Note: This utility has been rewritten in Rust, checkout url-parser-cli.

Installing

npm install -g parse-url-cli

Or use npx. ✨

Usage

Usage:
    parse-url <url> [component]
Options:
	--json  -j  Output JSON instead of a pretty represenation.
Examples:
    parse-url 'https://example.org:2000/hello/world?foo=bar#baz' host
    parse-url --json 'example.org:2000'

Pro tip: Use query-string-cli in conjunction with parse-url-cli.

Related

  • curl's trurl – Command line tool for URL parsing and manipulation.
  • url-decode-encode-cli – Command line utility for URL decoding & encoding.
  • query-string-cli – Decode & encode URL query strings in the command line.
  • whatwg-url – An implementation of the WHATWG URL Standard in JavaScript

Contributing

If you have a question or have difficulties using parse-url-cli, please double-check your code and setup first. If you think you have found a bug or want to propose a feature, refer to the issues page.

Package Sidebar

Install

npm i parse-url-cli

Weekly Downloads

586

Version

3.0.3

License

ISC

Unpacked Size

5.71 kB

Total Files

4

Last publish

Collaborators

  • derhuerst