Replies: 1 comment 1 reply
-
Node.js does not control this. This comes from the JavaScript language and is implemented in V8. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Currently String.prototype.repeat(count) only allows a count >= 0, adding a default would allow count to be negative without causing a RangeError. The default argument should be optional and the function should throw a RangeError when count < 0 and default is undefined, this will allow the update to not potentially affect other code.
Only place I could find that may be the source for this function is node/deps/v8/src/builtins/string-repeat.tq which I started dabbling in implementing this change here but I dont really know how to test this.
Beta Was this translation helpful? Give feedback.
All reactions