Usage
const sim = require('@4qwerty7/sim-node');
console.log(sim.supportedTypes); // ['8086', 'c', 'c++', 'java', 'lisp', 'm2', 'mira', 'pasc', 'text']
sim('c'/* type */, {hello: 'puts("hello");'} /* Map, Map-like or object key(name)-value(code) pair */).then(res => console.log(res/* array of triples, each contains name_a, name_b, the precentage of similarity */), err => console.log(err /* string or Error object */));
Usage
const sim = require('@4qwerty7/sim-node');
console.log(sim.supportedTypes); // ['8086', 'c', 'c++', 'java', 'lisp', 'm2', 'mira', 'pasc', 'text']
sim('c'/* type */, {hello: 'puts("hello");'} /* Map, Map-like or object key(name)-value(code) pair */).then(res => console.log(res/* array of triples, each contains name_a, name_b, the precentage of similarity */), err => console.log(err /* string or Error object */));