mirror of
https://github.com/microsoft/vscode.git
synced 2025-12-23 19:59:37 +00:00
Replace some common index based for loops with for-of loops
Replaces many loops of the form:
```js
for (let i = 0; i < elements.length; ++i) {
const i = elements[i];
...
}
```
with:
```js
for (const element of elements) {
...
}
```
Mix of a horrible regex based find/replace and manual touch ups
This commit is contained in:
@@ -13,8 +13,7 @@ import { ResourceMap } from '../utils/resourceMap';
|
||||
|
||||
function objsAreEqual<T>(a: T, b: T): boolean {
|
||||
let keys = Object.keys(a);
|
||||
for (let i = 0; i < keys.length; i++) {
|
||||
let key = keys[i];
|
||||
for (const key of keys) {
|
||||
if ((a as any)[key] !== (b as any)[key]) {
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user