Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

page-path-builder

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

page-path-builder - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

.npmignore

2

package.json
{
"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
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc