
Security News
Axios Maintainer Confirms Social Engineering Attack Behind npm Compromise
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.
Process UTF-8 and UTF-16.
Escape strings before including them in HTML or regex.
import { unhtml, unrexp } from "@libn/utf";
import { assertMatch } from "@std/assert";
assertMatch(unhtml("<script>alert(1)</script>"), /^[^<>]*$/);
assertMatch("(?:[\n])", RegExp(unrexp("(?:[\n])")));
Restrict strings to RFC 9839 Unicode Assignables subset, or at least replace lone surrogates.
import { uncode, unlone } from "@libn/utf";
import { assertEquals } from "@std/assert";
const string = "\ud800\0";
assertEquals(uncode(string), "\ufffd\ufffd");
assertEquals(unlone(string), "\ufffd\0");
Remove nonstandard breaks and diacritics.
import { unline, unmark } from "@libn/utf";
import { assertEquals } from "@std/assert";
const string = "\r\n\xf1";
assertEquals(unline(string), "\n\xf1");
assertEquals(unmark(string), "\r\nn");
Case fold strings to compare them case-insensitively.
import { uncase } from "@libn/utf";
import { assertEquals, assertNotEquals } from "@std/assert";
const one = "FUSS", two = "Fu\xdf";
assertNotEquals(one, two);
assertEquals(uncase(one), uncase(two));
FAQs
Process UTF-8 and UTF-16.
We found that @libn/utf demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.