@iconicompany/imatchingcore 1.0.0 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@iconicompany/imatchingcore",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"description": "Matching engine core library",
|
|
5
|
+
"repository": {
|
|
6
|
+
"type": "git",
|
|
7
|
+
"url": "https://github.com/iconicompany/imatchingcore.git"
|
|
8
|
+
},
|
|
9
|
+
"author": "iconicompany",
|
|
10
|
+
"license": "UNLICENSED",
|
|
5
11
|
"main": "src/specializations/specializations-matching-engine.ts",
|
|
6
12
|
"module": "src/specializations/specializations-matching-engine.ts",
|
|
7
13
|
"types": "src/specializations/specializations-matching-engine.ts",
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import path from 'path';
|
|
2
|
+
import fs from 'fs/promises';
|
|
2
3
|
import { SpecializationsMatchingEngine, type WordSynonym, type WordWeight } from './specializations-matching-engine';
|
|
3
4
|
|
|
4
5
|
export class SpecializationsMatchingFactory {
|
|
5
6
|
public static async create(): Promise<SpecializationsMatchingEngine> {
|
|
6
7
|
const csvPath = path.resolve(process.cwd(), 'data/specializations/specializations.csv');
|
|
7
|
-
const fileContent = await
|
|
8
|
+
const fileContent = await fs.readFile(csvPath, 'utf-8');
|
|
8
9
|
|
|
9
10
|
const specNames = fileContent
|
|
10
11
|
.split('\n')
|