• Artwork
        link
        fedilink
        English
        arrow-up
        2
        ·
        14 days ago

        I see! Thank you very much!

        Holy smokes… I had no idea… Though, I still abhor the “AI” involved, the NPM package itself is a dear nonsense… There’s dear String.padStart in the most of JavaScript engines!

        • kaageej
          link
          fedilink
          English
          arrow-up
          3
          ·
          14 days ago

          That feature wouldn’t come to JavaScript for another couple of years if I recall correctly. There was a “legit” use case for leftpad… Crazy as it may be.

      • whats_a_lemmy@midwest.social
        link
        fedilink
        English
        arrow-up
        1
        ·
        14 days ago

        This is definitely a bit:

        Jev gets one Choice with criteria named space_0, space_1, space_2, and so on, written directly up to space_10. For the example above, it should choose space_5. JavaScript reads the number, creates five spaces, and puts the value after them.

        This means the package can add between 0 and 10 spaces. If more than 10 spaces are needed, Jev has no correct option. Which feels appropriate for this project.

        There is one TypeSafe API request per call and retries are disabled. The request can fail, Jev can choose the wrong option, and it costs more than padStart(). Please don’t use this in production. Or anything important.