Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RangeError. Internal Error. Icu error in custom script #362

Closed
azzamsa opened this issue Mar 24, 2023 · 1 comment
Closed

RangeError. Internal Error. Icu error in custom script #362

azzamsa opened this issue Mar 24, 2023 · 1 comment

Comments

@azzamsa
Copy link

azzamsa commented Mar 24, 2023

Hi.

I want to have my words sorted. I write this script in node, and it runs fine.

let text =
  "emacs nnn jq ShellCheck tidy neofetch stow workrave pandoc flameshot copyq";

let sorted = text
  .split(" ")
  .sort((a, b) => a.localeCompare(b))
  .join(" ");
console.log(sorted);
⬢ ❯ node sort.js
copyq emacs flameshot jq neofetch nnn pandoc ShellCheck stow tidy workrave

But, when putting it in boop, I got the error below. RangeError. Internal Error. Icu error

/**
     {
         "api":1,
         "name":"Sort words",
         "description":"Sort words alphabetically",
         "author":"Azzam S.A (https://github.com/azzams)",
         "icon":"sort-characters",
         "tags":"sort,alphabet"
     }
 **/

function main(input) {
  input.text = input.text
    .replace(/\n$/, "")
    .split(" ")
    .sort((a, b) => a.localeCompare(b))
    .join(" ");
}

image

@azzamsa
Copy link
Author

azzamsa commented Mar 24, 2023

The issue is more suitable here: zoeyfyi/Boop-GTK#397

@azzamsa azzamsa closed this as completed Mar 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant