A full-featured download manager.
refactor: move rename utils location
Dr_rOot34011d7bc8e1
diff --git a/src/renderer/components/Task/AddTask.vue b/src/renderer/components/Task/AddTask.vueindex 5a314269..f4c3b76d 100644--- a/src/renderer/components/Task/AddTask.vue+++ b/src/renderer/components/Task/AddTask.vue@@ -177,8 +177,8 @@ import SelectDirectory from '@/components/Native/SelectDirectory'import SelectTorrent from '@/components/Task/SelectTorrent'import { prettifyDir } from '@/components/Native/utils'import { NONE_SELECTED_FILES, SELECTED_ALL_FILES } from '@shared/constants'-import { buildOuts } from '@shared/rename'import { detectResource, splitTaskLinks } from '@shared/utils'+import { buildOuts } from '@shared/utils/rename'import '@/components/Icons/inbox'const initialForm = state => {diff --git a/src/shared/rename.js b/src/shared/utils/rename.jssimilarity index 89%rename from src/shared/rename.jsrename to src/shared/utils/rename.jsindex 68456233..bcdc8650 100644--- a/src/shared/rename.js+++ b/src/shared/utils/rename.js@@ -3,14 +3,14 @@ const PLUS = '+'const MINUS = '-'const OPERATORS = [PLUS, MINUS]-export function getRuleString (out) {+export const getRuleString = (out) => {const rule = out.match(RULE_REGEX)const result = rule && rule[1]return result}-export function buildRule (rule) {+export const buildRule = (rule) => {let ruleArrlet operator = PLUSlet init = 1@@ -41,7 +41,7 @@ export function buildRule (rule) {}}-export function buildOuts (uris = [], out = '') {+export const buildOuts = (uris = [], out = '') => {const result = []const count = uris.lengthif (count === 0 || !out) {