Learn R Programming

waysign (version 0.1.1)

path_params: Deconstruct a path pattern

Description

This function parses a path pattern and returns both the name of the parameters and a version of the path formatted for glue string interpolation.

Usage

path_params(path)

Value

A list with the elements keys containing the names of all the path parameters and glue containing a glue ready version of the path

Arguments

path

The path pattern to parse

Examples

Run this code
path_params("/users/:user/assets/*")

Run the code above in your browser using DataLab