mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-01 07:47:49 +00:00
Have build remove trailing spaces in lines.
Former-commit-id: 580650186c9661b900ebbe846e13ba194fd2c0bc
This commit is contained in:
6
build.js
6
build.js
@@ -1135,10 +1135,10 @@
|
||||
})
|
||||
// remove unneeded horizontal rule comment separators
|
||||
.replace(/(\{\n)\s*\/\*-+\*\/\n|^ *\/\*-+\*\/\n(\s*\})/gm, '$1$2')
|
||||
// remove extraneous whitespace
|
||||
.replace(/^ *\n/gm, '\n')
|
||||
// remove lines with just whitespace and semicolons
|
||||
// remove lines with just spaces and semicolons
|
||||
.replace(/^ *;\n/gm, '')
|
||||
// remove trailing spaces from lines
|
||||
.replace(/ *$/gm, '')
|
||||
// consolidate multiple newlines
|
||||
.replace(/\n{3,}/g, '\n\n')
|
||||
// add trailing newline
|
||||
|
||||
6
dist/lodash.compat.js
vendored
6
dist/lodash.compat.js
vendored
@@ -872,7 +872,7 @@
|
||||
(conditions.join(' && ')) +
|
||||
') {\n ';
|
||||
}
|
||||
__p +=
|
||||
__p +=
|
||||
(obj.loop) +
|
||||
'; ';
|
||||
if (conditions.length) {
|
||||
@@ -886,7 +886,7 @@
|
||||
(conditions.join(' && ')) +
|
||||
') {\n ';
|
||||
}
|
||||
__p +=
|
||||
__p +=
|
||||
(obj.loop) +
|
||||
'; ';
|
||||
if (conditions.length) {
|
||||
@@ -914,7 +914,7 @@
|
||||
if (obj.array || support.nonEnumArgs) {
|
||||
__p += '\n}';
|
||||
}
|
||||
__p +=
|
||||
__p +=
|
||||
(obj.bottom) +
|
||||
';\nreturn result';
|
||||
|
||||
|
||||
30
dist/lodash.js
vendored
30
dist/lodash.js
vendored
@@ -1347,12 +1347,12 @@
|
||||
var shimKeys = function(object) {
|
||||
var index, iterable = object, result = [];
|
||||
if (!iterable) return result;
|
||||
if (!(objectTypes[typeof object])) return result;
|
||||
if (!(objectTypes[typeof object])) return result;
|
||||
for (index in iterable) {
|
||||
if (hasOwnProperty.call(iterable, index)) {
|
||||
result.push(index);
|
||||
result.push(index);
|
||||
}
|
||||
}
|
||||
}
|
||||
return result
|
||||
};
|
||||
|
||||
@@ -1444,15 +1444,15 @@
|
||||
}
|
||||
while (++argsIndex < argsLength) {
|
||||
iterable = args[argsIndex];
|
||||
if (iterable && objectTypes[typeof iterable]) {
|
||||
if (iterable && objectTypes[typeof iterable]) {
|
||||
var ownIndex = -1,
|
||||
ownProps = objectTypes[typeof iterable] && keys(iterable),
|
||||
length = ownProps ? ownProps.length : 0;
|
||||
|
||||
while (++ownIndex < length) {
|
||||
index = ownProps[ownIndex];
|
||||
result[index] = callback ? callback(result[index], iterable[index]) : iterable[index];
|
||||
}
|
||||
result[index] = callback ? callback(result[index], iterable[index]) : iterable[index];
|
||||
}
|
||||
}
|
||||
}
|
||||
return result
|
||||
@@ -1582,15 +1582,15 @@
|
||||
argsLength = typeof guard == 'number' ? 2 : args.length;
|
||||
while (++argsIndex < argsLength) {
|
||||
iterable = args[argsIndex];
|
||||
if (iterable && objectTypes[typeof iterable]) {
|
||||
if (iterable && objectTypes[typeof iterable]) {
|
||||
var ownIndex = -1,
|
||||
ownProps = objectTypes[typeof iterable] && keys(iterable),
|
||||
length = ownProps ? ownProps.length : 0;
|
||||
|
||||
while (++ownIndex < length) {
|
||||
index = ownProps[ownIndex];
|
||||
if (typeof result[index] == 'undefined') result[index] = iterable[index];
|
||||
}
|
||||
if (typeof result[index] == 'undefined') result[index] = iterable[index];
|
||||
}
|
||||
}
|
||||
}
|
||||
return result
|
||||
@@ -1693,10 +1693,10 @@
|
||||
var index, iterable = collection, result = iterable;
|
||||
if (!iterable) return result;
|
||||
if (!objectTypes[typeof iterable]) return result;
|
||||
callback = callback && typeof thisArg == 'undefined' ? callback : baseCreateCallback(callback, thisArg, 3);
|
||||
callback = callback && typeof thisArg == 'undefined' ? callback : baseCreateCallback(callback, thisArg, 3);
|
||||
for (index in iterable) {
|
||||
if (callback(iterable[index], index, collection) === false) return result;
|
||||
}
|
||||
if (callback(iterable[index], index, collection) === false) return result;
|
||||
}
|
||||
return result
|
||||
};
|
||||
|
||||
@@ -1768,15 +1768,15 @@
|
||||
var index, iterable = collection, result = iterable;
|
||||
if (!iterable) return result;
|
||||
if (!objectTypes[typeof iterable]) return result;
|
||||
callback = callback && typeof thisArg == 'undefined' ? callback : baseCreateCallback(callback, thisArg, 3);
|
||||
callback = callback && typeof thisArg == 'undefined' ? callback : baseCreateCallback(callback, thisArg, 3);
|
||||
var ownIndex = -1,
|
||||
ownProps = objectTypes[typeof iterable] && keys(iterable),
|
||||
length = ownProps ? ownProps.length : 0;
|
||||
|
||||
while (++ownIndex < length) {
|
||||
index = ownProps[ownIndex];
|
||||
if (callback(iterable[index], index, collection) === false) return result;
|
||||
}
|
||||
if (callback(iterable[index], index, collection) === false) return result;
|
||||
}
|
||||
return result
|
||||
};
|
||||
|
||||
|
||||
14
dist/lodash.underscore.js
vendored
14
dist/lodash.underscore.js
vendored
@@ -769,12 +769,12 @@
|
||||
var shimKeys = function(object) {
|
||||
var index, iterable = object, result = [];
|
||||
if (!iterable) return result;
|
||||
if (!(objectTypes[typeof object])) return result;
|
||||
if (!(objectTypes[typeof object])) return result;
|
||||
for (index in iterable) {
|
||||
if (hasOwnProperty.call(iterable, index)) {
|
||||
result.push(index);
|
||||
result.push(index);
|
||||
}
|
||||
}
|
||||
}
|
||||
return result
|
||||
};
|
||||
|
||||
@@ -986,8 +986,8 @@
|
||||
if (!iterable) return result;
|
||||
if (!objectTypes[typeof iterable]) return result;
|
||||
for (index in iterable) {
|
||||
if (callback(iterable[index], index, collection) === indicatorObject) return result;
|
||||
}
|
||||
if (callback(iterable[index], index, collection) === indicatorObject) return result;
|
||||
}
|
||||
return result
|
||||
};
|
||||
|
||||
@@ -1018,9 +1018,9 @@
|
||||
if (!objectTypes[typeof iterable]) return result;
|
||||
for (index in iterable) {
|
||||
if (hasOwnProperty.call(iterable, index)) {
|
||||
if (callback(iterable[index], index, collection) === indicatorObject) return result;
|
||||
if (callback(iterable[index], index, collection) === indicatorObject) return result;
|
||||
}
|
||||
}
|
||||
}
|
||||
return result
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user