Building a Single Page App without frameworks 🔥 - DEV Community

PHOTO EMBED

Sun Oct 24 2021 11:40:22 GMT+0000 (Coordinated Universal Time)

Saved by [deleted user] #javascript

const pathToRegex = path => new RegExp("^" + path.replace(/\//g, "\\/").replace(/:\w+/g, "(.+)") + "$");
content_copyCOPY

https://dev.to/dcodeyt/building-a-single-page-app-without-frameworks-hl9