Split into Browser-friendly library (i.e. without file access etc) and Node/CLI version. cc @DanielJDufour