Skip to content

Commit fd3b403

Browse files
committed
Remove unused code, siplify return function
1 parent 70571d4 commit fd3b403

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

app.js

100644100755
Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ const _ = require('lodash')
66
const moment = require('moment')
77
const read = require('read')
88
const chalk = require('chalk')
9-
const sinon = require('sinon')
109
const argv = require('yargs')
1110
.usage('Usage: git-issues-downloader [options] URL \nType git-issues-downloader --help to see a list of all options.')
1211
.help('h')
@@ -174,14 +173,12 @@ const requestBody = exports.requestBody = function (requestedOptions, callback)
174173
// take JSON data, convert them into CSV format and return them
175174

176175
const convertJSonToCsv = exports.convertJSonToCsv = function (jsData) {
177-
const csvData = jsData.map(object => {
176+
return jsData.map(object => {
178177
const date = moment(object.created_at).format('L')
179178
const labels = object.labels
180179
const stringLabels = labels.map(label => label.name).toString()
181180
return `"${object.number}"; "${object.title.replace(/"/g, '\'')}"; "${object.html_url}"; "${stringLabels}"; "${object.state}"; "${date}"\n`
182181
}).join('')
183-
184-
return csvData
185182
}
186183

187184
// execute main function with requested options and condition for URL input

0 commit comments

Comments
 (0)