From 5bab9b88e8ae901df459482c98b6a8332a91060c Mon Sep 17 00:00:00 2001 From: Vimal-Raghubir Date: Sun, 25 Mar 2018 20:07:57 -0400 Subject: [PATCH] Fixed travis checks --- src/core/config/Categories.js | 4 +- src/core/config/OperationConfig.js | 62 ++++++++++++++-------------- src/core/config/modules/CSVParser.js | 2 +- src/core/config/modules/OpModules.js | 4 +- src/core/operations/CSVParser.js | 52 +++++++++++------------ 5 files changed, 62 insertions(+), 62 deletions(-) diff --git a/src/core/config/Categories.js b/src/core/config/Categories.js index a36d52aa..2328659f 100755 --- a/src/core/config/Categories.js +++ b/src/core/config/Categories.js @@ -331,8 +331,8 @@ const Categories = [ "Extract EXIF", "Numberwang", "XKCD Random Number", - "Parse CSV to string", - "Parse string to CSV" + "Parse CSV to string", + "Parse string to CSV" ] }, { diff --git a/src/core/config/OperationConfig.js b/src/core/config/OperationConfig.js index 760380b9..cc5a2427 100755 --- a/src/core/config/OperationConfig.js +++ b/src/core/config/OperationConfig.js @@ -4020,37 +4020,37 @@ const OperationConfig = { outputType: "number", args: [] }, - "CSV To String": { - module: "CSVParser", - description: "Function used to parse CSV string to a regular string.", - inputType: "string", - outputType: "string", - args: [ - { - name: "delimeter", - type: "string", - value: "," - }, - { - name: "quotes", - type: "string", - value: '"' - } - ] - }, - "String to CSV": { - module: "CSVParser", - description: "Function used to parse a string array to a CSV string.", - inputType: "string", - outputType: "string", - args: [ - { - name: "delimeter", - type: "string", - value: "," - } - ] - } + "CSV To String": { + module: "CSVParser", + description: "Function used to parse CSV string to a regular string.", + inputType: "string", + outputType: "string", + args: [ + { + name: "delimeter", + type: "string", + value: "," + }, + { + name: "quotes", + type: "string", + value: '"' + } + ] + }, + "String to CSV": { + module: "CSVParser", + description: "Function used to parse a string array to a CSV string.", + inputType: "string", + outputType: "string", + args: [ + { + name: "delimeter", + type: "string", + value: "," + } + ] + } }; diff --git a/src/core/config/modules/CSVParser.js b/src/core/config/modules/CSVParser.js index a378be27..4ca120ae 100644 --- a/src/core/config/modules/CSVParser.js +++ b/src/core/config/modules/CSVParser.js @@ -18,4 +18,4 @@ OpModules.CSVParser = { "Parse to CSV": CSVParser.stringToCSV, }; -export default OpModules; \ No newline at end of file +export default OpModules; diff --git a/src/core/config/modules/OpModules.js b/src/core/config/modules/OpModules.js index c9d6d227..f8e45506 100644 --- a/src/core/config/modules/OpModules.js +++ b/src/core/config/modules/OpModules.js @@ -21,7 +21,7 @@ import PublicKeyModule from "./PublicKey.js"; import RegexModule from "./Regex.js"; import ShellcodeModule from "./Shellcode.js"; import URLModule from "./URL.js"; -import CSVModule from "./CSVParser.js" +import CSVModule from "./CSVParser.js"; Object.assign( OpModules, @@ -39,7 +39,7 @@ Object.assign( RegexModule, ShellcodeModule, URLModule, - CSVModule + CSVModule ); export default OpModules; diff --git a/src/core/operations/CSVParser.js b/src/core/operations/CSVParser.js index bad0780c..2684896e 100644 --- a/src/core/operations/CSVParser.js +++ b/src/core/operations/CSVParser.js @@ -1,4 +1,4 @@ -import { CSV } from 'csv-string'; +import { CSV } from "csv-string"; /** * @author VimalRaghubir [vraghubir0418@gmail.com] @@ -15,34 +15,34 @@ const CSVParser = { * @param {Object[]} args * @returns {string} */ - csvToString: function(input, args) { - var array = ""; - if (input) { - var detectedDelimeter = CSV.detect(input); - if (detectedDelimeter != args[0]) { - args[0] = detectedDelimeter; - } - array = CSV.parse(input, args[0], args[1]); - } else { - array = "The passed in data is not a csv string. Please pass in a csv string."; - } - return array; - }, - /** + csvToString: function(input, args) { + let array = ""; + if (input) { + let detectedDelimeter = CSV.detect(input); + if (detectedDelimeter !== args[0]) { + args[0] = detectedDelimeter; + } + array = CSV.parse(input, args[0], args[1]); + } else { + array = "The passed in data is not a csv string. Please pass in a csv string."; + } + return array; + }, + /** * Parse to CSV * @param {string} input * @param {Object[]} args * @returns {string} */ - stringToCSV: function(input, args) { - var string = ""; - if (input) { - string = CSV.stringify(input, args[0]); - } else { - string = "The passed in data is not a string that can be converted to a CSV."; - } - return string; - } -} + stringToCSV: function(input, args) { + let string = ""; + if (input) { + string = CSV.stringify(input, args[0]); + } else { + string = "The passed in data is not a string that can be converted to a CSV."; + } + return string; + } +}; -export default CSVParser; \ No newline at end of file +export default CSVParser;