Installation

Install MatchForge Core from npm and use its string similarity, preprocessing, and record-matching functionality in your JavaScript or TypeScript project.

Prerequisites

You need a JavaScript or TypeScript project with a package manager. MatchForge Core is distributed as an ECMAScript module and includes TypeScript declaration files.

Install the package

Install the published package using your preferred package manager. If you use npm, run:

bash
npm install @matchforge/core

Alternatively, use one of these package managers:

npmnpm install @matchforge/core
pnpmpnpm add @matchforge/core
yarnyarn add @matchforge/core
bunbun add @matchforge/core

Verify the installation

Import a function from the package and run a small example to check that it is available in your project.

typescript
import { normalizeString } from "@matchforge/core";

const result = normalizeString("  HELLO   WORLD  ");

console.log(result);
// "hello world"

The expected output is hello world. This example uses the default normalization options.

Import the functionality you need

MatchForge exposes its functionality through named exports. Import only the functions and types required by your application.

typescript
import {
  normalizeString,
  compareStrings,
  matchRecords,
} from "@matchforge/core";

You can also import individual similarity algorithms, text normalization options, and matching types. See the API reference for the complete export list.

Package details

Package@matchforge/core
Current published version0.1.0
Module formatESM
Type declarationsIncluded
LicenseMIT
View package on npm