lua-url
simple url parser like min-url.js
$ opm get chunpu/lua-url
min-url.lua
Install
use opm
opm install lua-url
Usage
local Url = require 'min-url'
test('Url.parse', function(t)
local url = Url.parse('http://user:pass@host.com:8080/p/a/t/h?query=string#hash')
t.deepEqual(url, {
protocol = 'http:',
auth = 'user:pass',
hostname = 'host.com',
port = 8080,
pathname = '/p/a/t/h',
query = 'query=string',
hash = '#hash'
})
end)
TODO
Url.format
shouldParseQuery
Authors
chunpu
License
mit
Dependencies
Versions
-
chunpu/lua-url 1.0.1simple url parser like min-url.js 2016-10-16 10:34:20
-
chunpu/lua-url 1.0.0simple url parser like min-url.js 2016-10-16 10:32:14