Pure JS implementation of Git Ignores