You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

@http404/unicode-range

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@http404/unicode-range

Unicode-range parser/builder

0.0.5
latest
Source
npmnpm
Version published
Weekly downloads
2
-86.67%
Maintainers
1
Weekly downloads
 
Created
Source

@http404/unicode-range

NPM-Badge CI-Badge Codecov-Badge

Unicode parsing made simple, safe, and supercharged! 🚀

@http404/unicode-range is an ECMAScript Module (ESM) JavaScript library designed for parsing, validating, and stringifying CSS unicode-range values. It supports unicode-range strings as specified in the CSS Fonts specification. This package is based on @japont/unicode-range and provides enhanced performance and additional features.

See the added features in our docs.

Install

npm i @http404/unicode-range

[!NOTE] This package is ESM-only and cannot be imported using require() from CommonJS. For more information, see this guide

Usage

import UnicodeRange from '@http404/unicode-range';

// Parse ( e.g. U+30-39 -> [30, 31, ..., 39] )
const Hiragana = UnicodeRange
	.parse('U+3041-3096, U+3099-309F')
	.map(cp => String.fromCodePoint(cp));

console.log(Hiragana);

// Stringify ( e.g. [30, 31, ..., 39] -> U+30-39 )
const DigitCodePoints = '0123456789'.split('').map(c => c.codePointAt(0));
const DigitUnicodeRange = UnicodeRange.stringify(DigitCodePoints);

console.log(DigitUnicodeRange);

Contribute

Yes.

License

MIT License

Keywords

css

FAQs

Package last updated on 09 Jul 2025

Did you know?

Socket

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.

Install

Related posts