forked from friendica/friendica-addons
20862be7d0
- slim/slim: ^3.1 - symfony/expression-language: ^3.4 - fxp/composer-asset-plugin: ~1.3 - bower-asset/vue: ^2.5 - bower-asset/vue-resource: ^1.5
17 lines
304 B
JavaScript
17 lines
304 B
JavaScript
/**
|
|
* URL Template (RFC 6570) Transform.
|
|
*/
|
|
|
|
import {expand} from '../lib/url-template';
|
|
|
|
export default function (options) {
|
|
|
|
var variables = [], url = expand(options.url, options.params, variables);
|
|
|
|
variables.forEach((key) => {
|
|
delete options.params[key];
|
|
});
|
|
|
|
return url;
|
|
}
|