Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: build

on:
push:
pull_request:
branches:
- main

jobs:
build:
runs-on: ubuntu-latest

name: build node v24 ubuntu-latest

steps:
- name: checkout
uses: actions/checkout@v6

- name: setup node 24
uses: actions/setup-node@v6
with:
node-version: 24

- name: npm ci
run: npm ci

- name: npm test
run: npm test
2 changes: 2 additions & 0 deletions index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export function compare(lhs: string, rhs: string): number;
export function normalize(text: string): string;
8 changes: 5 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@
*
*/

var unorm = require('unorm')

var lowerCaseMap = new Map([
[0x0000, 0xffff],
[0x0041, 0x0061],
Expand Down Expand Up @@ -376,4 +374,8 @@ function HFSPlusFastUnicodeCompare (str1, str2) {
}

exports.compare = HFSPlusFastUnicodeCompare
exports.normalize = unorm.nfd
exports.normalize = normalize

function normalize (text) {
return text.normalize('NFD')
}
Loading