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