prexp 0.0.1
prexp: ^0.0.1 copied to clipboard
Convert the path string to a regular expression, such as `/users/:name` and the like.
example/prexp_example.dart
import 'package:prexp/prexp.dart';
void main() {
const route = '/user/:name';
// Create a match function from a route.
final fn = match(route);
// Print the result.
//
// `Match(path: /user/John, params: {name: John})`
print(fn('/user/John'));
}