1.0.4 • Published 2 years ago

js-trgm v1.0.4

Weekly downloads
-
License
-
Repository
github
Last release
2 years ago

JS_TRGM

Match text using trigrams in Javascript, similar to Postgres' pg_trgm extension.

Installation

npm i js-trgm --save

Usage

import { similarity, trgm_search } from 'js-trgm';

const string1 = 'Hello Word';
const string2 = 'Hello World';
const coll1 = ['Hello World', 'Something else', 'Something else entirely'];

console.log(similarity(string1, string2));
console.log(trgm_search(string1, coll1));

Developing

Once you've created a project and installed dependencies with pnpm install, start a development server:

pnpm dev

# or start the server and open the demo in a new browser tab
pnpm dev -- --open

Packaging

pnpm package
1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago