Comparing version 0.0.1 to 0.0.2
{ | ||
"name": "clustring", | ||
"version": "0.0.1", | ||
"version": "0.0.2", | ||
"description": "Algorithms for clustering strings", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -85,2 +85,3 @@ clustring | ||
1. Update `version` in `package.json` | ||
2. `git commit -m 'vx.x.x && git tag vx.x.x && git push && git push origin vx.x.x` | ||
2. `npm publish` |
@@ -222,6 +222,15 @@ function stripLatin1Accent (c) { | ||
const arr = s.split(Whitespace) | ||
arr.sort() | ||
const tokens = s.split(Whitespace) | ||
tokens.sort() | ||
return arr.join(' ') | ||
const uniqueTokens = [] | ||
let lastToken = null | ||
for (const token of tokens) { | ||
if (token !== lastToken) { | ||
uniqueTokens.push(token) | ||
lastToken = token | ||
} | ||
} | ||
return uniqueTokens.join(' ') | ||
} | ||
@@ -228,0 +237,0 @@ |
@@ -10,2 +10,3 @@ import fingerprint from './fingerprint' | ||
[ 'words out of order', 'of order out words' ], | ||
[ 'words duplicate words', 'duplicate words' ], | ||
[ '', '' ], | ||
@@ -12,0 +13,0 @@ [ ' ', '' ] |
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
48295
418
87