+7
-4
@@ -46,8 +46,9 @@ | ||
| _arrayCmp = function(a, b) { | ||
| var i, _ref; | ||
| for (i = 0, _ref = max(a.length, b.length); 0 <= _ref ? i < _ref : i > _ref; 0 <= _ref ? i++ : i--) { | ||
| var i, la, lb, _ref, _ref2; | ||
| _ref = [a.length, b.length], la = _ref[0], lb = _ref[1]; | ||
| for (i = 0, _ref2 = min(la, lb); 0 <= _ref2 ? i < _ref2 : i > _ref2; 0 <= _ref2 ? i++ : i--) { | ||
| if (a[i] < b[i]) return -1; | ||
| if (a[i] > b[i]) return 1; | ||
| } | ||
| return 0; | ||
| return la - lb; | ||
| }; | ||
@@ -632,3 +633,3 @@ | ||
| } | ||
| result = Heap.nlargest(n, result); | ||
| result = Heap.nlargest(n, result, _arrayCmp); | ||
| _results = []; | ||
@@ -1323,2 +1324,4 @@ for (_j = 0, _len2 = result.length; _j < _len2; _j++) { | ||
| exports._arrayCmp = _arrayCmp; | ||
| exports.SequenceMatcher = SequenceMatcher; | ||
@@ -1325,0 +1328,0 @@ |
+1
-1
| { | ||
| "name" : "difflib" | ||
| , "version" : "0.1.2" | ||
| , "version" : "0.1.3" | ||
| , "description" : "text diff library ported from Python's difflib module" | ||
@@ -5,0 +5,0 @@ , "homepage" : "https://github.com/qiao/difflib.js" |
+2
-2
@@ -288,5 +288,5 @@ Difflib.js | ||
| <a name="getGroupedOpcodes" /> | ||
| #### getGroupedOpcodes() | ||
| #### getGroupedOpcodes([n]) | ||
| Return a list groups with upto n lines of context. | ||
| Return a list groups with upto n (default is 3) lines of context. | ||
| Each group is in the same format as returned by [getOpcodes()](#getOpcodes). | ||
@@ -293,0 +293,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
124085
0.47%1183
0.17%