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

@linkdotnet/stringoperations

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@linkdotnet/stringoperations - npm Package Compare versions

Comparing version 0.2.5 to 0.3.0

src/edit-distance/longest-common-subsequence.ts

4

index.ts

@@ -1,4 +0,4 @@

export { getLargestCommonSubstring } from './src/edit-distance/largest-common-substring'
export { getLargestCommonSubsequence } from './src/edit-distance/largest-common-subsequence'
export { getLongestCommonSubstring } from './src/edit-distance/longest-common-substring'
export { getLongestCommonSubsequence } from './src/edit-distance/longest-common-subsequence'
export { getLevenshteinDistance } from './src/edit-distance/levenshtein'
export { Trie } from './src/data-structure/trie'
{
"name": "@linkdotnet/stringoperations",
"version": "0.2.5",
"version": "0.3.0",
"description": "Collection of string utilities. Edit-Distances, Search and Data structures. Offers for example trie, levenshtein distance.",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

@@ -11,3 +11,3 @@ # String Operations for TypeScript

```ts
import { Trie, getLargestCommonSubstring, getLevenshteinDistance } from '@linkdotnet/stringoperations'
import { Trie, getLongestCommonSubstring, getLevenshteinDistance } from '@linkdotnet/stringoperations'

@@ -21,3 +21,3 @@ const trie = new Trie()

const largestCommonSubstring = getLargestCommonSubstring('testapps', 'appicontest') // test
const longestCommonSubstring = getLongestCommonSubstring('testapps', 'appicontest') // test
const distance = getLevenshteinDistance('Hello', 'Hallo') // 1

@@ -28,4 +28,4 @@ ```

### Edit-Distances
* Largest Common Subsequence
* Largest Common Substring
* Longest Common Subsequence
* Longest Common Substring
* Levenshtein Distance

@@ -35,2 +35,2 @@

* Trie
* Rope
* Rope (in development)

@@ -1,5 +0,5 @@

import { getLargestCommonSubsequence } from '../../src/edit-distance/largest-common-subsequence'
import { getLongestCommonSubsequence } from '../../src/edit-distance/longest-common-subsequence'
describe(getLargestCommonSubsequence.name, () => {
it('should get correct largest common subsequence', () => {
describe(getLongestCommonSubsequence.name, () => {
it('should get correct longest common subsequence', () => {
[

@@ -10,3 +10,3 @@ { one: 'Hello', two: 'Hallo', ignoreCase: false, expectedLcs: 'Hllo' },

].forEach(({ one, two, ignoreCase, expectedLcs }) => {
const actual = getLargestCommonSubsequence(one, two, ignoreCase)
const actual = getLongestCommonSubsequence(one, two, ignoreCase)

@@ -13,0 +13,0 @@ expect(actual).toBe(expectedLcs)

@@ -1,5 +0,5 @@

import { getLargestCommonSubstring } from '../../src/edit-distance/largest-common-substring'
import { getLongestCommonSubstring } from '../../src/edit-distance/longest-common-substring'
describe(getLargestCommonSubstring.name, () => {
it('should get correct largest common substring', () => {
describe(getLongestCommonSubstring.name, () => {
it('should get correct longest common substring', () => {
[

@@ -12,3 +12,3 @@ { one: 'ThatIsAWord', two: 'Word', ignoreCase: false, expectedLcs: 'Word' },

].forEach(({ one, two, ignoreCase, expectedLcs }) => {
const actual = getLargestCommonSubstring(one, two, ignoreCase)
const actual = getLongestCommonSubstring(one, two, ignoreCase)

@@ -15,0 +15,0 @@ expect(actual).toBe(expectedLcs)

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