Support for NPM. Thanks to @pvlugter for the help on using FileFunction