Skip to content

Commit

Permalink
fixup! update timerified function properties
Browse files Browse the repository at this point in the history
  • Loading branch information
himself65 committed Apr 28, 2022
1 parent 9ad894b commit a5f78fe
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions lib/internal/perf/timerify.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

const {
FunctionPrototypeBind,
ObjectDefineProperties,
MathCeil,
ReflectApply,
ReflectConstruct,
Expand Down Expand Up @@ -88,6 +89,19 @@ function timerify(fn, options = {}) {
return result;
}

ObjectDefineProperties(timerified, {
length: {
configurable: false,
enumerable: true,
value: fn.length,
},
name: {
configurable: false,
enumerable: true,
value: `timerified ${fn.name}`
}
});

return timerified;
}

Expand Down

0 comments on commit a5f78fe

Please sign in to comment.