joewalnes / filtrex

A simple, safe, JavaScript Filter Expression compiler for end-users
MIT License
1.05k stars 74 forks source link

Name collision with "require" #9

Open JonathanWheeler opened 9 years ago

JonathanWheeler commented 9 years ago

filtrex has a global name collision with requirejs's require. Can we please rename all references to require?

joewalnes commented 9 years ago

This is actually an issue in the jison.js dependency.

A few options:

  1. As part of the build file we find and replace all "require" refs to something else, e.g. "_internal_filterex_require".
  2. We wrap everything in an anonymous function (function() { ... })() so it doesn't pollute the global namespace.

@JonathanWheeler: I'm busy with other projects right now. Want to take a crack at either of these?