| |
| ▲ | realityking 2 days ago | parent | next [-] | | There’s been a lot of progress (Temporal, URL, TextDecoder, Base64 encoding, etc.) but there are still gaps. Math.clamp is a big one (it’s a TC39 proposal). I’d also love to have the stats functions that Python has (geometric mean, median, etc.). On the more ambitious end: CSV reading/writing and IPv4/IPv6 manipulation. | | | |
| ▲ | simonw 2 days ago | parent | prev | next [-] | | What standard library? Do you mean the built-in Array.x etc methods you get in the core language spec? | | |
| ▲ | skydhash 2 days ago | parent | next [-] | | In the browser, Javascript’s role is to add interactivity to the web page, and the API has a good surface area (even if not really pretty). People talk about the lack of standard library, but they can never say what’s missing. https://developer.mozilla.org/en-US/docs/Web/API The above seems fairly expansive, even if we remove all the experimental ones in the list. | |
| ▲ | tshaddox 2 days ago | parent | prev [-] | | I suppose we could quibble about what exactly “standard library” means, but I’m presuming we’re talking about the web (rather than, say, Node or Bun). And to me it’s fair to use it to refer to all web APIs that are widely available. Things like crypto, ArrayBuffer, TextEncoder, File and the File System Access API, Intl, the Streams API, Window.performance, etc. |
| |
| ▲ | throw-the-towel 2 days ago | parent | prev | next [-] | | String.splitRight, for one. (As an example: "www.a.north.website.com".splitRight(".", 3) == ["www.a.north", "website", "com"].) | | |
| ▲ | bakkoting 2 days ago | parent | next [-] | | Python and Rust have such a thing, but not e.g. Java, Go, C#. And I can't find any libraries on npm which do this. That seems like a very niche need, not actually the sort of thing whose absence causes people to have lots of npm dependencies. | |
| ▲ | fireflash38 2 days ago | parent | prev [-] | | When would you want that when it wouldn't be covered by more domain-specific use cases? |
| |
| ▲ | eudamoniac 2 days ago | parent | prev [-] | | Most things in Remeda, ramda, rxjs, the methods in the Ruby stdlib, etc. would all be great to have. I use at least Remeda in every project when I can. |
|