Devalue URL
Friendly, typed package used to strip values out of URLs, leaving only the URL template, as it might appear in an express app, for example.
Installing
npm install devalue-url
Usage
;const urlDevaluer = ;urlDevaluer;// www.example.com/hello/:intId
Custom Patterns
;const urlDevaluer = extraTemplatePatterns: 'abcReplacementName': RegExp'abc' 'defReplacementName': 'def' ;urlDevaluer;// www.example.com/hello/:abcReplacementName/:defReplacementName
Local Setup
git clone https://github.com/briankopp/devalue-urlcd devalue-urlnpm installnpm run buildnpm run test