aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLouis Pilfold <louis@lpil.uk>2024-10-07 18:21:31 +0100
committerLouis Pilfold <louis@lpil.uk>2024-10-07 18:21:31 +0100
commit924329a2eb3b58d137f94b56f35d50889df67eb5 (patch)
treed1481c24b87cb39575155a7095c03a009371d957 /src
parentf63d960bdc8471de501604f782011a25fbac4124 (diff)
downloadgleam_stdlib-924329a2eb3b58d137f94b56f35d50889df67eb5.tar.gz
gleam_stdlib-924329a2eb3b58d137f94b56f35d50889df67eb5.zip
Format
Diffstat (limited to 'src')
-rw-r--r--src/gleam_stdlib.mjs14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/gleam_stdlib.mjs b/src/gleam_stdlib.mjs
index 1c0754f..1aa4753 100644
--- a/src/gleam_stdlib.mjs
+++ b/src/gleam_stdlib.mjs
@@ -160,7 +160,7 @@ let segmenter = undefined;
function graphemes_iterator(string) {
if (globalThis.Intl && Intl.Segmenter) {
- segmenter ??= new Intl.Segmenter();
+ segmenter ||= new Intl.Segmenter();
return segmenter.segment(string)[Symbol.iterator]();
}
}
@@ -509,9 +509,9 @@ export function parse_query(query) {
const [key, value] = section.split("=");
if (!key) continue;
- const decodedKey = unsafe_percent_decode_query(key)
- const decodedValue = unsafe_percent_decode_query(value)
- pairs.push([decodedKey, decodedValue])
+ const decodedKey = unsafe_percent_decode_query(key);
+ const decodedValue = unsafe_percent_decode_query(value);
+ pairs.push([decodedKey, decodedValue]);
}
return new Ok(List.fromArray(pairs));
} catch {
@@ -938,7 +938,7 @@ export function bit_array_inspect(bits, acc) {
export function bit_array_compare(first, second) {
for (let i = 0; i < first.length; i++) {
if (i >= second.length) {
- return new Gt(); // first has more items
+ return new Gt(); // first has more items
}
const f = first.buffer[i];
const s = second.buffer[i];
@@ -946,7 +946,7 @@ export function bit_array_compare(first, second) {
return new Gt();
}
if (f < s) {
- return new Lt()
+ return new Lt();
}
}
// This means that either first did not have any items
@@ -954,5 +954,5 @@ export function bit_array_compare(first, second) {
if (first.length === second.length) {
return new Eq();
}
- return new Lt(); // second has more items
+ return new Lt(); // second has more items
}