Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

rfc6570-expand

bouzuya1.5kMIT0.2.0TypeScript support: included

A template processor for RFC 6570 URI Template

6570, RFC 6570, rfc, template, uri

readme

rfc6570-expand

A template processor for RFC 6570 URI Template.

Installation

$ npm install rfc6570-expand

Usage

import { init } from 'rfc6570-expand';

const template = '{foo}';
const variables = { foo: 'bar' };

const { expand } = init(template);
const uri = expand(variables);

console.log(uri); // 'bar'

Alternatives

Badges

Circle CI

License

MIT

Author

bouzuya <m@bouzuya.net> (http://bouzuya.net)