JavaScript/Typescript util for querying dynamic/named params
npm install query-dynamic-params
import { queryDynamicParams } from 'query-dynamic-params';
const url = '/users/:id/:name';
const path = '/users/1/john';
const params = queryDynamicParams(url, path, ['id', 'name']);
console.log(params); // { id: '1', name: 'john' }
npm run build
npm run test
MIT