mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
6 lines
184 B
TypeScript
6 lines
184 B
TypeScript
import * as Route from 'route-parser';
|
|
|
|
const route = new Route('/users/:id');
|
|
const matched = route.match('/users/42'); // => { id: '42' }
|
|
const reversed = route.reverse({ id: 42 });
|