#17 Added support to be imported as AMD/CJS module
Merge pull request #22 from tehsis/master

#17 #15 added amd support and configurable treshold