nowfound

Life & fun · April 4, 2025

uWrap.js – A faster and more accurate text wrapping util in < 2KB

A 10x faster and more accurate text wrapping util in < 2KB (min) - leeoniya/uWrap

uWrap.js – A faster and more accurate text wrapping util in < 2KB launched on April 4, 2025 with 121 votes, #387 of 7,818 launches that month and more than 95% of that year's launches. The site was still online in September 2026, 1 year on.

Visit github.com ↗Alternativestop 5% of April 2025

In plain words

uWrap.js is a text wrapping utility designed for developers who need efficient word-wrapping functionality in their applications. It offers faster performance and greater accuracy than comparable solutions while maintaining a compact footprint of less than 2KB. The tool is available on GitHub, making it accessible for integration into web and JavaScript projects where precise text formatting is required.

written from the facts on this page · September 2026

From the sources

uWrap exists to efficiently predict varying row heights for list and grid virtualization , a technique for UI performance optimization when rendering large, scrollable datasets. Doing this both quickly and accurately turns out to be a non-trivial task since Canvas2D provides no API for text wrapping, and measureText() is quite expensive; measuring via DOM is also a non-starter due to poor performance. Additionally, font size, variable-width kerning , letter-spacing , explicit line breaks, and different white-space choices affect the wrapping locations. uWrap outperforms canvas-hypertxt by a wide margin in both CPU and memory usage while being significantly more accurate. The benchmark below…from github.com

Does a similar job

all alternatives →
  • uFuzzy.js – A tiny, efficient fuzzy search that doesn't suck2022 · github.com · ▲251

    Hello HN! I became frustrated with the unpredictible&#x2F;poor match quality and opaqueness of "relevance scores" in existing fuzzy and fulltext search libs, so I tried something different and this is the result. The main selling point is the result quality &#x2F; ordering, with best-in-class memory overhead and excellent performance being bonuses. The API is pretty stable at this point, but looking for feedback before committing to 1.0. TL;DR The test corpus is a 4MB json file with 162k words&#x2F;phrases, so give it a second for initial download. You can also drag&#x2F;drop your own…

  • WebSlides2017 · webslides.tv · ▲486

    The easiest way to make HTML presentations and long-forms.

  • 1kb JavaScript library for building front end applications2017 · github.com · ▲187

    1kB-ish JavaScript framework for building hypertext applications - hyperapp/hyperapp

  • Fast.js – faster reimplementations of native JavaScript functions2014 · github.com · ▲323

    Faster user-land reimplementations for several common builtin native JavaScript functions. - codemix/fast.js

  • 1 KB JavaScript library for building front end apps2017 · github.com · ▲242

    1kB-ish JavaScript framework for building hypertext applications - hyperapp/hyperapp

  • Million Lint2024 · million.dev · ▲144

    Identify & fix slow code – Grammarly for performance

More life & fun this month

the category →

Source: Show HN post ↗

Launched alongside, April 2025

the whole month →
  • Hi everyone, I built PyXL — a hardware processor that executes a custom assembly generated from Python programs, without using a traditional interpreter or virtual machine. It compiles Python -> CPython Bytecode -> Instruction set designed for direct hardware execution. I’m sharing an early benchmark: a GPIO test where PyXL achieves a 480ns round-trip toggle — compared to 14-25 micro seconds on a MicroPython Pyboard - even though PyXL runs at a lower clock (100MHz vs. 168MHz). The design is stack-based, fully pipelined, and preserves Python's dynamic typing without static type restrictions.…

    Dev tools · 2025 · runpyxl.com

  • The Unsure Calculator is an online tool that lets you calculate with numbers you’re not sure about.

    Life & fun · 2025 · filiph.github.io

  • https:&#x2F;&#x2F;the-pocket.github.io&#x2F;Tutorial-Codebase-Knowledge&#x2F;

    AI · 2025 · github.com

  • Whatting▲898

    The iPad diary, just for you

    Work · 2025 · whatting.com

  • Browser with AI companions that automate web tasks

    AI · 2025 · strawberrybrowser.com

  • Peek▲828

    AI personal finance coach that guides you through decisions

    Work · 2025 · peek.money