A lightweight implementation of routing and URL manager
JavaScript
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
tests separated from OzJS repository Nov 24, 2012
README.md support bower Jul 10, 2013
bower.json reduce dependencies Dec 16, 2014
package.json
urlkit.js reduce dependencies Dec 16, 2014

README.md

URLKit

  • A lightweight implementation of routing and URL manager
  • Automatic switch between html5 History API and IE's hashbang

Usage

AMD and OzJS

Get the code

Add to your project as new dependency

Or download directly from Github

Dependencies

Examples

API and usage

var URLKit = require('urlkit');
  • URLKit.parse(url) --
  • URLKit.param(urlObj, options) --
  • URLKit.SUPPORT_PUSHSTATE --
var url = URLKit({
    baseUrl: '', // optional, '/' for default
    win: window,  // optional
    autotidy: true // optional, true for default
});
  • url.listen() --
  • url.stop() --
  • url.route(rule, handler) --
  • url.nav(urlConfig, { /* replace: true, route: false */ }) --
  • url.load(url, options) --
  • url.set(options) --
  • url.checkRules(url, rules) --
  • url.getBaseUrl() --

Under construction...

More References

See OzJS Project Homepage

Release History

See OzJS Release History

License

Copyright (c) 2010 - 2013 dexteryy
Licensed under the MIT license.