aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorinoas <mail@inoas.com>2022-05-20 19:57:57 +0200
committerLouis Pilfold <louis@lpil.uk>2022-05-22 21:14:34 +0100
commitb900c323a286229eacbac4b583a7eea96be29644 (patch)
tree36ab1dab7d176e5bb13a369f4e66fd82946af6ed
parentb683850a94b00a5bd161d54aac6d37f0a8098d7e (diff)
downloadgleam_stdlib-b900c323a286229eacbac4b583a7eea96be29644.tar.gz
gleam_stdlib-b900c323a286229eacbac4b583a7eea96be29644.zip
remove the locale alltogether
-rw-r--r--src/gleam_stdlib.mjs8
1 files changed, 1 insertions, 7 deletions
diff --git a/src/gleam_stdlib.mjs b/src/gleam_stdlib.mjs
index 0a3aef2..97fa491 100644
--- a/src/gleam_stdlib.mjs
+++ b/src/gleam_stdlib.mjs
@@ -94,14 +94,8 @@ export function string_length(string) {
}
function graphemes_iterator(string) {
- let env_locale = () => {
- if (typeof navigator.language !== "undefined") {
- return navigator.language;
- }
- return Intl.DateTimeFormat().resolvedOptions().locale;
- };
if (Intl && Intl.Segmenter) {
- return new Intl.Segmenter(env_locale).segment(string)[Symbol.iterator]();
+ return new Intl.Segmenter().segment(string)[Symbol.iterator]();
}
}