Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
uritemplate
Advanced tools
Readme
This is a javascript implementation of RFC6570 - URI Template, and can expand templates up to and including Level 4 in that specification.
It exposes a constructor function UriTemplate with the two methods:
Be aware, that a parsed UriTemplate is frozen, so it is stateless. You can reuse instances of UriTemplates.
You can use uritemplate.js in any even not so modern browser (Tested even with IE8 in IE7-Mode), see file demo.html. But you can also use it with node:
npm install uritemplate
and then in a node application:
var
UriTemplate = require('uritemplate'),
template;
template = UriTemplate.parse('{?query*})';
template.expand({query: {first: 1, second: 2}});
--> "?first=1&second=2"
or within a html document (see also demo.html):
<script type="text/javascript" src="bin/uritemplate.js"></script>
<script type="text/javascript">
var template = UriTemplate.parse('{?query*}');
alert(template.expand({query: {first: 1, second: 2}}));
</script>
If you want to clone the git project, be aware of the submodule uritemplate-test. So you have to to:
git clone --recursive https://github.com/fxa/uritemplate-js.git
npm install
npm test
The integration tests are taken from https://github.com/uri-templates/uritemplate-test as a submodule. The tests are integrated in the Jakefile.
Copyright 2013 Franz Antesberger
MIT License, see http://mit-license.org/
FAQs
An UriTemplate implementation of rfc 6570
The npm package uritemplate receives a total of 25,559 weekly downloads. As such, uritemplate popularity was classified as popular.
We found that uritemplate demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.