From 172eca60814f95c491e7c305a13cf2f6d3124bc4 Mon Sep 17 00:00:00 2001 From: jdalton Date: Thu, 7 May 2015 23:59:51 -0700 Subject: [PATCH] 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. --- lodash.src.js | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/lodash.src.js b/lodash.src.js index b62e11d33..445b49862 100644 --- a/lodash.src.js +++ b/lodash.src.js @@ -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._ = _; }