# tn1150

> HFS Plus string utilities

Latest version **1.0.0** (published 2025-05-21) · MIT license · 0 weekly downloads

## Install

```sh
npm install tn1150
pnpm add tn1150
yarn add tn1150
bun add tn1150
```

## Health

**Score 40/100 (D)** — status: maintenance-mode.

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads.

Negative: stale; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2025-05-21 |
| First published | 2016-05-15 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM |
| Node | ^20.9.0 \|\| ^22.11.0 \|\| >=24.0.0 |
| Dependencies | 1 |
| Unpacked size | 10.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Maintainers | linusu |
| Keywords | tn1150, hfs, hfs+, hfs plus, unicode, comparison, normalization |

## Links

- npm: https://www.npmjs.com/package/tn1150
- Repository: https://github.com/LinusU/node-tn1150
- Homepage: https://github.com/LinusU/node-tn1150#readme
- Issues: https://github.com/LinusU/node-tn1150/issues
- npm.io page: https://npm.io/package/tn1150

## Dependencies (1)

- [unorm](https://npm.io/package/unorm.md) ^1.6.0

## Recent versions

- 1.0.0 (latest) — 2025-05-21
- 0.1.0 — 2016-05-15

## README

# TN1150

HFS Plus string utilities.

## Usage

```js
import { compare, normalize } from 'tn1150'

// Sort filenames
filenames.sort(compare)

// Normalize filename
filename = normalize(filename)
```

## API

### `compare(lhs, rhs)`

- `lhs` (`string`, required)
- `rhs` (`string`, required)
- returns `number`

Compare two strings using the algorithm from TN1150. Useful for sorting filenames.

### `normalize(input)`

- `input` (`string`, required)
- returns `string`

Normalize a string using Unicode Canonical Decomposition.

---
_Source: https://npm.io/package/tn1150 · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
