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

urlpattern

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

urlpattern

Parse and transform URL patterns.

  • 0.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
42
decreased by-36.36%
Maintainers
1
Weekly downloads
 
Created
Source

urlpattern

Parse and transform URL patterns.

Install

$ npm install urlpattern

Usage

Express-style Patterns

Parse a pattern into a RegExp, and its constituent placeholders.

var pattern = require('urlpattern').express;

var placeholders = [];
var regexp = pattern.parse('/user/:id', placeholders);

Subsitute variables into a pattern.

var pattern = require('urlpattern').express;

pattern.transform('/user/:id', { id: '1234' });
// => '/user/1234'

Tests

$ npm install
$ npm test

Build Status

Credits

License

The MIT License

Copyright (c) 2013 Jared Hanson <http://jaredhanson.net/>

Keywords

FAQs

Package last updated on 11 Jul 2013

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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