crocser

Fast, lightweight, tinny url parser


Keywords
url-parser, express, http, url-parsing, esmodules, npm-package, typescript
License
MIT
Install
npm install crocser@1.0.4

Documentation

Crocser

Fast🚀, lightweight, tinny url parser

illustration

Install

$ npm install crocser
# or
$ yarn add crocser
# or
$ pnpm install crocser

Basic example :

import { parse } from 'crocser'

const info = parse('https://vk.com/im?sel=c901')
console.log(info)

Then send a request:

{
  "protocol": "https",
  "hostname": "vk.com",
  "subdomain": "",
  "domain": "vk.com",
  "domainWithoutSuffix": "vk",
  "publicSuffix": "com",
  "queryParamsResult": [["sel", "c901"]]
}

For contributors:

  1. Create your feature branch (git checkout -b my-new-feature)
  2. Commit your changes (git commit -am 'Add some feature')
  3. Push to the branch (git push origin my-new-feature)
  4. Create new Pull Request
  5. ???
  6. PROFIT!!!