1.1.1 • Published 3 years ago

crocser v1.1.1

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

Crocser

Fast 🚀, lightweight 🎈, tinny URL parser

I think there are a million similar solutions, but this one takes no more than 5kb and is easy to use

illustration

Install ⚙️

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

Basic example :

import { parseUrl } from 'crocser'

const info = parseUrl('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 💻:

How to start ?

  1. Write your logic
  2. Write test
$ pnpm run test

illustration

if tests passed :

  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!!!
1.1.1

3 years ago

1.1.0

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago