npx react-router-v6-codemods match-path-arguments path/of/files/ or/some**/*glob.js
# or
yarn global add react-router-v6-codemods
react-router-v6-codemods match-path-arguments path/of/files/ or/some**/*glob.js
node ./bin/cli.js match-path-arguments path/of/files/ or/some**/*glob.js
Input (basic.input.js):
const match = matchPath('/users/123', {
path: '/users/:id',
exact: true, // Optional, defaults to false
strict: false, // Optional, defaults to false
});
Output (basic.output.js):
const match = matchPath({
path: '/users/:id',
caseSensitive: false, // Optional, defaults to false
end: true, // Optional, defaults to false
}, '/users/123');