mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-01 15:57:48 +00:00
Tweak regexp in post-compile.js.
Former-commit-id: 8c6933944703a17582696fb10b45f12926fe1030
This commit is contained in:
@@ -40,7 +40,7 @@
|
||||
// flip `typeof` expressions to help optimize Safari and
|
||||
// correct the AMD module definition for AMD build optimizers
|
||||
// (e.g. from `"number" == typeof x` to `typeof x == "number")
|
||||
source = source.replace(/(return)?\s*("[^"]+")\s*([!=]=)\s*(typeof(?:\s*\([^)]+\)|\s+[\w.]+))/g, function(match, ret, type, equality, expression) {
|
||||
source = source.replace(/(return)?("[^"]+")\s*([!=]=)\s*(typeof(?:\s*\([^)]+\)|\s+[\w.]+))/g, function(match, ret, type, equality, expression) {
|
||||
return (ret ? ret + ' ' : '') + expression + equality + type;
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user