lua-url
类似 min-url.js 的简单 URL 解析器
$ opm get chunpu/lua-url
min-url.lua
安装
使用 opm
opm install lua-url
使用
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)
待办事项
Url.format
shouldParseQuery
作者
chunpu
许可证
mit
依赖项
版本
-
chunpu/lua-url 1.0.1类似 min-url.js 的简单 URL 解析器 2016-10-16 10:34:20
-
chunpu/lua-url 1.0.0类似 min-url.js 的简单 URL 解析器 2016-10-16 10:32:14