string-comparison
Advanced tools
Comparing version 1.0.0 to 1.0.1
{ | ||
"name": "string-comparison", | ||
"version": "1.0.0", | ||
"description": "字符串相似度比较", | ||
"version": "1.0.1", | ||
"description": "A library implementing different string similarity", | ||
"main": "./src/index.js", | ||
"scripts": { | ||
"test": "node ./node_modules/mocha/bin/mocha", | ||
"lint": "eslint src" | ||
"lint": "eslint src", | ||
"build": "./node_modules/.bin/babel src --out-dir lib" | ||
}, | ||
@@ -16,3 +17,3 @@ "repository": { | ||
"strings", | ||
"compareSimilarity", | ||
"compare similarity", | ||
"similarity", | ||
@@ -24,4 +25,10 @@ "Dice's Coefficient", | ||
"Longest Common Subsequence", | ||
"Metric Longest Common Subsequence" | ||
"Metric Longest Common Subsequence", | ||
"difference", | ||
"compare", | ||
"comparision", | ||
"similar", | ||
"distance", | ||
"match", | ||
"sort match" | ||
], | ||
@@ -39,2 +46,3 @@ "author": { | ||
"async": "^3.1.0", | ||
"babel-preset-minify": "^0.5.1", | ||
"mocha": "^6.2.1", | ||
@@ -41,0 +49,0 @@ "npm-run-all": "^4.1.5" |
@@ -0,23 +1,18 @@ | ||
const Sim = ['Cosine', 'DiceCoefficient', 'JaccardIndex', 'Levenshtein', 'LongestCommonSubsequence', 'MetricLCS'] | ||
const [ | ||
Cosine, | ||
DiceCoefficient, | ||
JaccardIndex, | ||
Levenshtein, | ||
LongestCommonSubsequence, | ||
MetricLCS | ||
] = Sim.map(v => require(`./main/packages/${v}`)) | ||
module.exports = { | ||
cosine: require('./main/packages/Cosine'), | ||
diceCoefficient: require('./main/packages/Cosine'), | ||
jaccardIndex: require('./main/packages/Cosine'), | ||
levenshtein: require('./main/packages/Cosine'), | ||
lcs: require('./main/packages/Cosine'), | ||
mlcs: require('./main/packages/Cosine') | ||
} | ||
// let S= ['Cosine', 'DiceCoefficient', 'JaccardIndex', 'Levenshtein', 'LongestCommonSubsequence', 'MetricLCS'] | ||
// let s = ['cosine', | ||
// 'diceCoefficient', | ||
// 'jaccardIndex', | ||
// 'levenshtein', | ||
// 'lcs', | ||
// 'mlcs' | ||
// ] | ||
// Object.defineProperty(module.export = {}, '', { | ||
// configurable: false, | ||
// enumerable: true, | ||
// get: () => require('./main/packages/Cosine') | ||
// }) | ||
cosine: new Cosine(), | ||
diceCoefficient: new DiceCoefficient(), | ||
jaccardIndex: new JaccardIndex(), | ||
levenshtein: new Levenshtein(), | ||
lcs: new LongestCommonSubsequence(), | ||
mlcs: new MetricLCS() | ||
} |
Sorry, the diff of this file is not supported yet
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 2 instances in 1 package
55530
30
827
8
8
1