Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

trigram-similarity

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

trigram-similarity

Determining the similarity of alphanumeric text based on trigram matching

  • 1.0.7
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
18K
increased by40.02%
Maintainers
1
Weekly downloads
 
Created
Source

trigram-similarity npm version

The trigram-similarity module provides functions and operators for determining the similarity of alphanumeric text based on trigram matching. This is the JavaScript implementation of Postgres pg_trgm and returns a number that indicates how similar the two arguments are.

The range of the result is zero (indicating that the two strings are completely dissimilar) to one (indicating that the two strings are identical).

If you want to learn more about the concept see this post.

Installation

npm i trigram-similarity

Usage

import trigramSimilarity from 'trigram-similarity';
const similarity = trigramSimilarity('Chateau blanc', 'chateau cheval blanc');
// 0.7368421052631579

Keywords

FAQs

Package last updated on 25 Oct 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc