npm.io
0.2.1 • Published 13 years ago

pax

Licence
Version
0.2.1
Deps
0
Vulns
0
Weekly
0
Stars
2

pax

Curry your path segments with intelligent escaping. Tiny. Used by hoax and coax, hopefully your library too.

Build Status

Getting Started

Install the module with: npm install pax

It likes strings:

var pax = require('pax'),
	site = pax("http://www.couchbase.com",{myDefault : "query"}),
	jchris = site("jchris");

jchris.toString() === "http://www.couchbase.com/jchris?myDefault=query"

And arrays:

var pax = require('pax'),
	site = pax(["http://www.couchbase.com","people",{myDefault : "query"}]),
	jchris = site(["jchris","party"]);

jchris.toString() === "http://www.couchbase.com/jchris/party?myDefault=query"

Lots of tests (run with grunt)

License

Copyright (c) 2013 Chris Anderson Licensed under the APL license.