Latest Threat Research:SANDWORM_MODE: Shai-Hulud-Style npm Worm Hijacks CI Workflows and Poisons AI Toolchains.Details
Socket
Book a DemoInstallSign in
Socket

froute-picker

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

froute-picker

Picking and matching module used by froute.

latest
npmnpm
Version
0.0.10
Version published
Maintainers
1
Created
Source

froute-picker Build Status npm version Dependency Status

froute-picker is a "picking" and "matching" module used by froute. It picks parameters from url templates matches urls to the templates while assigning parameter values.

Getting started

Using npm

npm install froute-picker
var picker = require("froute-picker");

Example

Picking parameters from a url template and matching a url to the template

var template = "/apple/{type}/size/{size}",
    picked = picker.pick(template),
    matchUrl = picker.match("/apple/gala/size/large");
    result = matchUrl(picked);

expect(result).not.toBeNull();
expect(result.type).toEqual("gala");
expect(result.size).toEqual("large");

Keywords

froute

FAQs

Package last updated on 09 Feb 2015

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