UNPKG

formio-sfds

Version:
17 lines (12 loc) 410 B
import interpolate from 'interpolate' // ugh, FIXME! this pollutes the global namespace import 'uri-template-lite' const { URI } = window export { uriTemplate, interp } function uriTemplate (template) { const uri = new URI.Template(template) return data => uri.expand(data) } function interp (template, data) { return (typeof template === 'function') ? template(data) : interpolate(template, data) }