rfc6570-expand

A template processor for RFC 6570 URI Template

Usage no npm install needed!

<script type="module">
  import rfc6570Expand from 'https://cdn.skypack.dev/rfc6570-expand';
</script>

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)