This package has been deprecated

Author message:

bye~

xsm-url-utils

1.1.0 • Public • Published

xsm-url-utils

url utils

install

npm install xsm-url-utils

usage

In node, or with browserify:

var UrlUtils = require('xsm-url-utils');
  • {Object-UrlParts} parseUrl({string})

  • {string} concatUrlParts({Object-UrlParts} urlParts)

  • {string} addTimestamp({string} url)

UrlUtils.addTimestamp('http://www.sample.com/path.html')
// return:
// "http://www.sample.com/path.html?v=1438165051488"
  • {Object} parseParams({string} params)
  • {Object} getParams({string} url)
  • {string} getParam({string} url, {string} paramName)
UrlUtils.addTimestamp('http://www.sample.com/path.html?name=luobo&age=18', 'name')
// return:
// "luobo"

test

npm test

Readme

Keywords

Package Sidebar

Install

npm i xsm-url-utils

Weekly Downloads

1

Version

1.1.0

License

MIT

Last publish

Collaborators

  • luobo-modules
  • xsm-ue