makes usable via npm as a package, adds MIT license

Hey, I kind of assumed MIT, which makes further contributions easy :) This PR also makes the module into a package that can be used with npm.