
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
ql.io-uri-template
Advanced tools
This module provides a small URI template parser. ql.io uses URI templates for specifying URIs of APIs. See docs for more examples.
Here is overview of the syntax.
Each template can have an arbitrary number of tokens enclosed in braces ({
and }
).
You can generate URIs from URI templates by calling the format()
function with an object
containing values, and optionally, default values.
All tokens are optional and single valued by default.
You can mark that a token is required by prefixing the name of the token with ^
. When the
value for a required token is missing, formatting will fail.
You can also mark that a token is multi-valued by prefixing the name of the token with a |
.
If the value of v2
is ['v2_1','v2_2']
, calling the format()
would result in
http://myserver/somepath?p2=v2_1,v2_2
Some APIs may not take more than a given number of values. In such cases, you can specify a maximum
integer before |
.
http://myserver/somepath?p1={^v1}&p2={5|v2}
If you supply more than 5 values, the format()
function will return Math.ceil(n/5)
URIs.
FAQs
A small URI template processor for ql.io.
The npm package ql.io-uri-template receives a total of 1 weekly downloads. As such, ql.io-uri-template popularity was classified as not popular.
We found that ql.io-uri-template demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?
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.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.