I'll try it tonight and let you know in github issues. Was trying myself to achieve something similar (using go and charm v2). Anyway, thanks for sharing.
How is it possible that this code (line 9 of the index.js) isn't present in the source github repo, but can be seen in the beta feature of npmjs.com?
Also, the package 1.3.3 has been downloaded 0 times according to npmjs.com, how can the writer of this article has been able to detect this and not increment the download counter?