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:
npm install @matchforge/coreAlternatively, use one of these package managers:
npm install @matchforge/corepnpm add @matchforge/coreyarn add @matchforge/corebun add @matchforge/coreVerify the installation
Import a function from the package and run a small example to check that it is available in your project.
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.
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.