@linkdotnet/stringoperations
Advanced tools
Comparing version 0.2.5 to 0.3.0
@@ -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) |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
25629