Make _.merge assign null values. [closes #151]

Former-commit-id: 5a839996db9475182d5957d2f8cb4b3c265b0d9f
This commit is contained in:
John-David Dalton
2013-01-05 00:12:33 -08:00
parent 2b23020695
commit e2c2a37221
7 changed files with 24 additions and 14 deletions

View File

@@ -41,8 +41,8 @@
// 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*(typeof(?:\s*\([^)]+\)|\s+[\w.]+))/g, function(match, ret, type, equality, expression) {
return (ret ? ret + ' ' : '') + expression + equality + type;
source = source.replace(/(\w)?("[^"]+")\s*([!=]=)\s*(typeof(?:\s*\([^)]+\)|\s+[.\w[\]]+))/g, function(match, other, type, equality, expression) {
return (other ? other + ' ' : '') + expression + equality + type;
});
// add trailing semicolon