Hacker News new | ask | show | jobs
by torme 5266 days ago
There's also a really nice pre-existing library for this: PathJS.

https://github.com/mtrpcic/pathjs

Been using this for a while, with a lot of success.