2.5.0 • Published 3 years ago

uri-parse-lib v2.5.0

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

uri-parse-lib

Small library for parse URI(URL) for web/node

NPM

Try it

DEMO

What the difference with new URL(url)?

  1. It is deeply parse search params like a object(check examples)
  2. Check first one!(it is main once)

Install

npm install uri-parse-lib

Usage

import { parseURI } from "uri-parse-lib"`

parseURI("http://user:pass@example.com:8080/directory/file.ext?query[nan][0][nan]=1&query[nan][1][sed]=4&sed[tatat][rqwr]=5&query[nan][2][sed]=4#anchor");`
{
  "hash": "#anchor",
  "host": "example.com",
  "origin": "http://example.com:8080",
  "password": "pass",
  "pathname": "/directory/file.ext",
  "port": "8080",
  "protocol": "http",
  "query": {
    "query": {
      "nan": [
        {
          "nan": "1"
        },
        {
          "sed": "4"
        },
        {
          "sed": "4"
        }
      ]
    },
    "sed": {
      "tatat": {
        "rqwr": "5"
      }
    }
  },
  "user": "user"
}
2.5.0

3 years ago

2.4.0

3 years ago

2.3.0

4 years ago

2.2.1

5 years ago

2.2.0

6 years ago

2.1.6

6 years ago

2.1.5

6 years ago

2.1.4

6 years ago

2.1.3

6 years ago

2.1.2

6 years ago

2.1.1

6 years ago

2.1.0

6 years ago

2.0.10

7 years ago

2.0.9

7 years ago

2.0.8

7 years ago

2.0.7

7 years ago

2.0.6

7 years ago

2.0.5

7 years ago

2.0.4

7 years ago

2.0.3

7 years ago

2.0.2

7 years ago

2.0.1

7 years ago

2.0.0

7 years ago

1.0.8

7 years ago

1.0.7

7 years ago

1.0.6

7 years ago

1.0.5

7 years ago

1.0.4

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago