remove string-similarity

This commit is contained in:
neil 2022-11-28 16:44:23 +08:00
parent 0660a4efc8
commit e8815faa45
2 changed files with 3 additions and 8 deletions

View file

@ -42,14 +42,6 @@
packages = allPackages; packages = allPackages;
} }
}; };
function getMatchScore(term: string, pkg: Package) {
// provide higher value with name
const { full_name, desc } = pkg;
const nameScore = stringSimilarity.compareTwoStrings(full_name, term);
const descriptionScore = stringSimilarity.compareTwoStrings(desc, term);
return nameScore * 80 + descriptionScore * 20;
}
</script> </script>
<div class="bg-black border border-gray"> <div class="bg-black border border-gray">

View file

@ -1,5 +1,8 @@
module.exports = { module.exports = {
root: true, root: true,
globals: {
NodeJS: true
},
parser: '@typescript-eslint/parser', parser: '@typescript-eslint/parser',
extends: [ extends: [
'eslint:recommended', 'eslint:recommended',