stdlib icon indicating copy to clipboard operation
stdlib copied to clipboard

🎁 Gleam's standard library

Results 74 stdlib issues
Sort by recently updated
recently updated
newest added
trafficstars

Closes #627 I'm new to Gleam, so fully prepared for what I'm doing here to be unidiomatic or otherwise distasteful for some reason, but thought it would be worth having...

As discussed on Discord, I believe the `dynamic.optional_field` behaviour is a bit off and this PR tries to adjust it to match the documented behaviour. The use of `decode_optional` in...

I messed up the last pull request, and had like over 100 test failures. Not sure what happened, so here is attempt #2. I just have to get the erlang...

`uri.origin` should not include a trailing slash - I've corrected the relevant tests and updated the function to `concat` its own results, as this behaviour appears specific to the `origin`...

https://github.com/gleam-lang/stdlib/blob/d8f046a674197b41e409fec0522a5f6d2d4c7a6d/src/gleam/dynamic.gleam#L320-L329 I think it would be nice to return the index of the offending element instead of just `"*"` I'm new to gleam, but I had a little play around...

https://github.com/gleam-lang/stdlib/blob/v0.38.0/test/gleam/uri_test.gleam#L409-L425 I think these tests are wrong in that the origin should be `http://example.test` (without trailing slash)`. The examples in the function documentation show it without a slash

bug
good first issue
help wanted

My own naive implementation seems a bit slow with larger strings: ```gleam fn replace_all( regex: Result(Regex, CompileError), input: String, replacement: String, ) -> String { let assert Ok(re) = regex...

Inspired by the `request.new()` and `response.new()` functions from the `gleam_http` package, and while working with `Uri`s, I thought that it would also be a good idea to be able to...

Considering the signature of `Uri`, to make working with the type a little nicer, I would propose to add value setter primitives corresponding to fields on the `Uri` type: ```gleam...

## Example ```gleam float.to_precision(2.43434348473, precision: 2) // -> 2.43 ``` ```gleam float.to_precision(547890.453444, precision: -3) // -> 548000.0 ```