@4qwerty7/sim-node
v3.2.9
Published
SIM is a code similarity test tool, sim-node is a wasm version.
Downloads
10
Readme
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 */));