diff --git a/lib/index.js b/lib/index.js index 1886f22..a7d9f3a 100644 --- a/lib/index.js +++ b/lib/index.js @@ -1 +1 @@ -"use strict";function _slicedToArray(a,b){return _arrayWithHoles(a)||_iterableToArrayLimit(a,b)||_nonIterableRest()}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}function _iterableToArrayLimit(a,b){if(Symbol.iterator in Object(a)||"[object Arguments]"===Object.prototype.toString.call(a)){var c=[],d=!0,e=!1,f=void 0;try{for(var g,h=a[Symbol.iterator]();!(d=(g=h.next()).done)&&(c.push(g.value),!(b&&c.length===b));d=!0);}catch(a){e=!0,f=a}finally{try{d||null==h["return"]||h["return"]()}finally{if(e)throw f}}return c}}function _arrayWithHoles(a){if(Array.isArray(a))return a}var Sim=["Cosine","DiceCoefficient","JaccardIndex","Levenshtein","LongestCommonSubsequence","MetricLCS"],_Sim$map=Sim.map(function(a){return require("./main/packages/".concat(a))}),_Sim$map2=_slicedToArray(_Sim$map,6),Cosine=_Sim$map2[0],DiceCoefficient=_Sim$map2[1],JaccardIndex=_Sim$map2[2],Levenshtein=_Sim$map2[3],LongestCommonSubsequence=_Sim$map2[4],MetricLCS=_Sim$map2[5];module.exports={cosine:new Cosine,diceCoefficient:new DiceCoefficient,jaccardIndex:new JaccardIndex,levenshtein:new Levenshtein,lcs:new LongestCommonSubsequence,mlcs:new MetricLCS}; \ No newline at end of file +"use strict";var Cosine=require("./main/packages/Cosine"),DiceCoefficient=require("./main/packages/DiceCoefficient"),JaccardIndex=require("./main/packages/JaccardIndex"),Levenshtein=require("./main/packages/Levenshtein"),LongestCommonSubsequence=require("./main/packages/LongestCommonSubsequence"),MetricLCS=require("./main/packages/MetricLCS");module.exports={cosine:new Cosine,diceCoefficient:new DiceCoefficient,jaccardIndex:new JaccardIndex,levenshtein:new Levenshtein,lcs:new LongestCommonSubsequence,mlcs:new MetricLCS}; \ No newline at end of file diff --git a/lib/main/packages/Cosine.js b/lib/main/packages/Cosine.js index 22fb391..2749170 100644 --- a/lib/main/packages/Cosine.js +++ b/lib/main/packages/Cosine.js @@ -1 +1 @@ -"use strict";function _typeof(a){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},_typeof(a)}function _classCallCheck(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function _defineProperties(a,b){for(var c,d=0;dd||2>e)return 0;for(var f=new Map,g=0;gd||2>e)return 0;for(var f=new Map,g=0;ga.length)&&(b=a.length);for(var c=0,d=Array(b);ca.length)&&(b=a.length);for(var c=0,d=Array(b);ca.length)&&(b=a.length);for(var c=0,d=Array(b);c require(`./main/packages/${v}`)) +const Cosine = require('./main/packages/Cosine') +const DiceCoefficient = require('./main/packages/DiceCoefficient') +const JaccardIndex = require('./main/packages/JaccardIndex') +const Levenshtein = require('./main/packages/Levenshtein') +const LongestCommonSubsequence = require('./main/packages/LongestCommonSubsequence') +const MetricLCS = require('./main/packages/MetricLCS') module.exports = { cosine: new Cosine(),