[BUG] valid
function is creating a new SemVer
object and immediately destroying it
#544
Closed
1 task done
Labels
Is there an existing issue for this?
Current Behavior
Original author: https://marvinh.dev/blog/speeding-up-javascript-ecosystem/
parse
returns a newSemVer
ornull
object, which is only used to verify that the supplied version string can be consideredSemVer
:That is a huge job for GC because the
SemVer
is created and destroyed every time function calledExpected Behavior
Verify that provided version string is valid
SemVer
without creating a new object.E.g. copy some code from
SemVer
constructor:That's not perfect solution, but we get rid of unused
SemVer
objectsSteps To Reproduce
Environment
The text was updated successfully, but these errors were encountered: