feat: Initialize project with core dependencies, Vultr API client, customer database service, and migration documentation.
This commit is contained in:
25
not_used/test_fuzzy_interface.js
Normal file
25
not_used/test_fuzzy_interface.js
Normal file
@@ -0,0 +1,25 @@
|
||||
require('dotenv').config();
|
||||
const mikrotik = require('./services/mikrotikService');
|
||||
|
||||
async function test() {
|
||||
const inputs = ['2000109'];
|
||||
|
||||
console.log("Testing Fuzzy Interface Matching...");
|
||||
|
||||
for (const input of inputs) {
|
||||
console.log(`\nSearching for '${input}'...`);
|
||||
try {
|
||||
// We will invoke the method I am about to write
|
||||
const found = await mikrotik.findInterface(input);
|
||||
if (found) {
|
||||
console.log(`MATCH: '${input}' -> '${found.name}'`);
|
||||
} else {
|
||||
console.log(`NO MATCH for '${input}'`);
|
||||
}
|
||||
} catch (e) {
|
||||
console.error(e.message);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
test();
|
||||
Reference in New Issue
Block a user