Simple javascript router written in TypeScript