-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
116 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"name": "jsonman", | ||
"version": "1.0.4", | ||
"version": "1.0.5", | ||
"author": "zhudesheng <[email protected]>", | ||
"description": "free,security app for json format", | ||
"license": "MIT", | ||
|
@@ -64,6 +64,7 @@ | |
}, | ||
"dependencies": { | ||
"axios": "^0.18.0", | ||
"electron-find": "^1.0.7", | ||
"element-ui": "^2.15.6", | ||
"vue": "^2.5.16", | ||
"vue-electron": "^1.0.6", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
/** | ||
* | ||
* @param separator 切割字符串 | ||
* @param str 待切割字符串 | ||
* @param insertBefore 匹配项前面插入字符串 | ||
* @returns {string|*} | ||
*/ | ||
export function splitStrPrint(separator, str, insertBefore) { | ||
|
||
if (!separator) { | ||
return str; | ||
} | ||
if (!str) { | ||
return ''; | ||
} | ||
if (!insertBefore) { | ||
insertBefore = ''; | ||
} | ||
|
||
|
||
let splits = str.split(separator); | ||
if (splits.length === 0) { | ||
return ''; | ||
} | ||
let result = ''; | ||
|
||
result = splits[0]; | ||
|
||
for (let i = 1; i < splits.length; i++) { | ||
result = result.concat(insertBefore); | ||
result = result.concat(separator); | ||
result = result.concat(splits[i]); | ||
} | ||
return result; | ||
} | ||
|