Replaced var with let and const in PrettyPrinter, DiffBuilder, and friends
This commit is contained in:
@@ -5,7 +5,7 @@ getJasmineRequireObj().ObjectPath = function(j$) {
|
||||
|
||||
ObjectPath.prototype.toString = function() {
|
||||
if (this.components.length) {
|
||||
return '$' + map(this.components, formatPropertyAccess).join('');
|
||||
return '$' + this.components.map(formatPropertyAccess).join('');
|
||||
} else {
|
||||
return '';
|
||||
}
|
||||
@@ -35,14 +35,6 @@ getJasmineRequireObj().ObjectPath = function(j$) {
|
||||
return "['" + prop + "']";
|
||||
}
|
||||
|
||||
function map(array, fn) {
|
||||
var results = [];
|
||||
for (var i = 0; i < array.length; i++) {
|
||||
results.push(fn(array[i]));
|
||||
}
|
||||
return results;
|
||||
}
|
||||
|
||||
function isValidIdentifier(string) {
|
||||
return /^[A-Za-z\$_][A-Za-z0-9\$_]*$/.test(string);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user