Avoid using require in source because browserify does a quick regexp match for \brequire\b before deciding whether to build an AST to get require calls.

This commit is contained in:
jdalton
2015-05-07 23:59:51 -07:00
parent 004aaed783
commit 172eca6081

View File

@@ -10509,7 +10509,7 @@
* use a third-party library like [_he_](https://mths.be/he).
*
* Though the ">" character is escaped for symmetry, characters like
* ">" and "/" don't require escaping in HTML and have no special meaning
* ">" and "/" don't need escaping in HTML and have no special meaning
* unless they're part of a tag or unquoted attribute value.
* See [Mathias Bynens's article](https://mathiasbynens.be/notes/ambiguous-ampersands)
* (under "semi-related fun fact") for more details.
@@ -11524,9 +11524,6 @@
* });
* }
*
* // use `_.runInContext` to avoid conflicts (esp. in Node.js)
* var _ = require('lodash').runInContext();
*
* _.mixin({ 'vowels': vowels });
* _.vowels('fred');
* // => ['e']
@@ -12511,7 +12508,7 @@
if (moduleExports) {
(freeModule.exports = _)._ = _;
}
// Export for Narwhal or Rhino -require.
// Export for Narwhal or Rhino with CommonJS.
else {
freeExports._ = _;
}