@@ -40,7 +40,9 @@ 'use strict'; | ||
| var theSub = null; | ||
| subs.forEach(function (sub) { | ||
| var theSubIndex = null; | ||
| subs.forEach(function (sub, subIndex) { | ||
| var level = (0, _jsLevenshtein2.default)(movie, sub); | ||
| if (level < best) { | ||
| best = level; | ||
| theSub = srt; | ||
| theSub = sub; | ||
| theSubIndex = subIndex; | ||
| } else if (level === best) { | ||
@@ -53,2 +55,3 @@ theSub = null; | ||
| var newPath = _path2.default.resolve(dir, _path2.default.basename(movie, _path2.default.extname(movie)) + '.srt'); | ||
| subs.splice(theSubIndex, 1); | ||
| _fs2.default.renameSync(originalPath, newPath); | ||
@@ -55,0 +58,0 @@ } else { |
+1
-1
| { | ||
| "name": "maryam-cli", | ||
| "version": "0.3.1", | ||
| "version": "0.3.2", | ||
| "description": "A cli tool for persian users.", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
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
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
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
12596
0.89%194
1.57%