Earlier quoted context omitted.
that actually seems really inefficient, it could avoid the array allocation and fill call by just moving the length check...
You could also just use `String.prototype.padStart()` [1], and you get a nice optimized C++ implementation :D [1]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...
JSR: The JavaScript Registry
41–50 of 183 posts
Re: JSR: The JavaScript Registry
#42Earlier quoted context omitted.
You could also just use `String.prototype.padStart()` [1], and you get a nice optimized C++ implementation :D [1]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...
Pass, not a Rust implementation /s
Re: JSR: The JavaScript Registry
#43Kevin from the Deno team here - happy to answer any questions you have today!
Re: JSR: The JavaScript Registry
#44Re: JSR: The JavaScript Registry
#45Earlier quoted context omitted.
that actually seems really inefficient, it could avoid the array allocation and fill call by just moving the length check...
You could also just use `String.prototype.padStart()` [1], and you get a nice optimized C++ implementation :D [1]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...
Re: JSR: The JavaScript Registry
#46One thing I'm not sure about when reading their policy is what'll happen in another kik situation. If someone were to claim the scope Microsoft (for example) that had no relation to Microsoft and then Microsoft came along and wanted the scope what would happen? If MS got the scope what would happen to the packages in that scope, or if MS didn't get it what is done to clearly communicate that this is an unofficial acc…
Re: JSR: The JavaScript Registry
#47One thing I'm not sure about when reading their policy is what'll happen in another kik situation. If someone were to claim the scope Microsoft (for example) that had no relation to Microsoft and then Microsoft came along and wanted the scope what would happen? If MS got the scope what would happen to the packages in that scope, or if MS didn't get it what is done to clearly communicate that this is an unofficial acc…
I'd suggest they require a DNS entry to use a scope and all scopes have a one to one relationship with a domain.
Re: JSR: The JavaScript Registry
#48One thing I'm not sure about when reading their policy is what'll happen in another kik situation. If someone were to claim the scope Microsoft (for example) that had no relation to Microsoft and then Microsoft came along and wanted the scope what would happen? If MS got the scope what would happen to the packages in that scope, or if MS didn't get it what is done to clearly communicate that this is an unofficial acc…
I'd suggest they require a DNS entry to use a scope and all scopes have a one to one relationship with a domain.
Re: JSR: The JavaScript Registry
#49Re: JSR: The JavaScript Registry
#50Seeing Bun/Node/Deno support reminds me of a question: are there any good resources on writing JS that works in all 3 and the browser? For example if I wanted to write a simple filesystem API that would work the same across bunodeno?