scarylooking / theresamayjs

https://scarylooking.github.io/theresamayjs/
The Unlicense
115 stars 5 forks source link

Pollutes the global namespace / doesn't work when required #10

Open mattandrews opened 7 years ago

mattandrews commented 7 years ago

When using theresamayjs in your application it exposes potentially-dangerous methods to the global environment.

Additionally, theresamayjs is not compatible with AMD techniques – indeed, it is not possible to require theresamayjs.

scarylooking commented 7 years ago

hey, thanks for the comment. I'm not totally sure how to fix that. Can you point me in the right direction?

samhh commented 7 years ago

I suspect you'd only need to change the function declaration to module.exports = function theresaMay () { to solve both issues.

See another small library I've started using for an example: https://github.com/oztune/string-replace-to-array/blob/master/string-replace-to-array.js

jethrolarson commented 7 years ago

I don't know, polluting the environment seems fitting.