Skip to content

Commit

Permalink
Remove arrow functions (benjamn#303)
Browse files Browse the repository at this point in the history
  • Loading branch information
zodern authored Sep 5, 2021
1 parent b38ea33 commit 6290280
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions lib/runtime/entry.js
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ function createSnapshot(entry, name, newValue) {
var newKeys = [];

if (name === "*") {
safeKeys(newValue).forEach(keyOfValue => {
safeKeys(newValue).forEach(function (keyOfValue) {
// Evaluating value[key] is risky because the property might be
// defined by a getter function that logs a deprecation warning (or
// worse) when evaluated. For example, Node uses this trick to display
Expand All @@ -321,7 +321,9 @@ function createSnapshot(entry, name, newValue) {
var oldSnapshot = entry.snapshots[name];
if (
oldSnapshot &&
newKeys.every(key => oldSnapshot[key] === newSnapshot[key]) &&
newKeys.every(function (key) {
return oldSnapshot[key] === newSnapshot[key]
}) &&
newKeys.length === Object.keys(oldSnapshot).length
) {
return oldSnapshot;
Expand Down Expand Up @@ -372,7 +374,7 @@ function forEachSetter(entry, names, callback) {
names = Object.keys(entry.setters);
}

names.forEach(name => {
names.forEach(function (name) {
// Ignore setters asking for module.exports.__esModule.
if (name === "__esModule") return;

Expand Down Expand Up @@ -400,7 +402,7 @@ function forEachSetter(entry, names, callback) {
var keys = consumeKeysGivenSnapshot(entry, name, snapshot);
if (keys === void 0) return;

keys.forEach(key => {
keys.forEach(function (key) {
var setter = settersByKey[key];
if (!setter) {
return;
Expand Down

0 comments on commit 6290280

Please sign in to comment.