page-path-builder
Advanced tools
Comparing version 1.0.0 to 1.0.1
{ | ||
"name": "page-path-builder", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "Uses a page.js-style routing string to build up a path you can link to", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -9,6 +9,6 @@ | ||
var path = buildPath('/wat/:huh/yeah', { | ||
huh: 'go figure' | ||
}) | ||
var path = buildPath('/wat/:huh/yeah', { huh: 'go figure' }) | ||
console.log(path) // => /wat/go%20figure/yeah | ||
Or parse a path once for more efficient url construction later: | ||
@@ -18,9 +18,9 @@ | ||
var path = buildPath(parsedPath, { | ||
id: 13 | ||
}) | ||
var path = buildPath(parsedPath, { id: 13 }) | ||
var anotherPath = buildPath(parsedPath, { | ||
id: 1337 | ||
}) | ||
console.log(path) // => /page/13 | ||
var anotherPath = buildPath(parsedPath, { id: 1337 }) | ||
console.log(anotherPath) // => /page/1337 | ||
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
2554
42