Closed devinus closed 4 years ago
I have evaluated publishing non-minified files to npm and I have reached the conclusion that the only possible errors that could propagate from this file would be passing an improper type to the TextDecoder.prototype.decode method. The TextEncoder throws no errors because it coerces its argument to a string on line 80. Of course, if you did (new TextEncoder).encode({get buffer(){ throw Error("Troll") }})
then an error would propagate outwards. However, even in this esoteric hypothetical scenario, you would more likely be interested in which file the throwFunc
originated from rather than which line of code in FastestSmallestTextEncoderDecoder propagated the error. Thus, I may be entirely wrong (if so, please explain it to me), but I do not see the need to include the source code at the cost of a longer file parsing time. Many NodeJS projects already take forever to startup as-is on non-SSD hard drives and I do not want to contribute any time to that long wait. Nevertheless, I have included a source map pointed to by the minified file should the need ever arise. If I am wrong and there is legitimate cause for increasing loaded files weight, then please explain it to me--I would be very very interested in hearing about it.
I really want to thank you for opening all of these Issues. It really means a lot to me. Thank you so much for being so helpful.
Devinus, much time has gone by and I am uncertain if and when you will respond. It is fine if you are too busy, but I shall temporarily close this issue in a week if there is no feedback about whether the source maps have fixed the problem.
~ Happy Coding.
This would enable debugging the package when there's a problem.