xprezzo-url-parser

1.1.0 • Public • Published

xprezzo-url-parser

Xprezzo URL parser

Install

This is a Node.js module available through the npm registry. Installation is done using the npm install command:

$ npm install xprezzo-url-parser

API

const parseurl = require('xprezzo-url-parser')

parseurl(req)

Parse the URL of the given request object (looks at the req.url property) and return the result. The result is the same as url.parse in Node.js core. Calling this function multiple times on the same req where req.url does not change will return a cached parsed object, rather than parsing again.

parseurl.original(req)

Parse the original URL of the given request object and return the result. This works by trying to parse req.originalUrl if it is a string, otherwise parses req.url. The result is the same as url.parse in Node.js core. Calling this function multiple times on the same req where req.originalUrl does not change will return a cached parsed object, rather than parsing again.

People

Xprezzo and related projects are maintained by BCloudgen Wong.

License

MIT

Readme

Keywords

none

Package Sidebar

Install

npm i xprezzo-url-parser

Weekly Downloads

3

Version

1.1.0

License

MIT

Unpacked Size

6.55 kB

Total Files

5

Last publish

Collaborators

  • xprezzo