You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Actually, format writes to this.version :( I'm hunting down spurious allocations in my project and the call to this.format came up in my debugging.
I'm surprised that this function both reads and writes to a property. It may be better to turn version into a getter that calculates the value on the fly but that might impact people who are relying for it to be calculated?
I don't see this.format() specifically as a performance issue. As you said, it is required to write this.version. I'm going to close this but keep open #458 to track overall reuse of instances.
Is there an existing issue for this?
Current Behavior
node-semver/classes/semver.js
Line 76 in e9a1f26
Expected Behavior
node-semver/classes/semver.js
Line 76 in e9a1f26
Steps To Reproduce
node-semver/classes/semver.js
Line 76 in e9a1f26
Environment
All Environments
The text was updated successfully, but these errors were encountered: