Skip to content

xprezzo/xprezzo-url-parser

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

xprezzo cached url parser

Resources

License

Stars

Watchers

Forks

Packages

No packages published