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

metric-lcs

Package Overview
Dependencies
Maintainers
0
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

metric-lcs

Zero dependency Metric Longest Common Subsequence implementation in js

  • 1.0.1-rc
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
76K
increased by26.14%
Maintainers
0
Weekly downloads
 
Created
Source

Build Status

metric-lcs

Zero dependency Metric Longest Common Subsequence implementation in js.

Usage

npm i metric-lcs

import metriclcs from "metric-lcs";
console.log(metriclcs("ABDEF", "ABDIF")); //.8

or

const metriclcs = require("metric-lcs");
console.log(metriclcs("ABDEF", "ABDIF")); //.8

Use case

Longest Common Subsequence is used with diff, so the metric version of it is suitable for comparing larger strings or for comparing likely subsets of strings since it ignores edit distance and lowers the cost of insertion.

Thanks

Special thanks to tdebatty for java-string-similarity, which I used as a reference implementation.

Keywords

FAQs

Package last updated on 09 Dec 2024

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