File tree Expand file tree Collapse file tree 1 file changed +1
-4
lines changed Expand file tree Collapse file tree 1 file changed +1
-4
lines changed Original file line number Diff line number Diff line change @@ -6,7 +6,6 @@ const _ = require('lodash')
66const moment = require ( 'moment' )
77const read = require ( 'read' )
88const chalk = require ( 'chalk' )
9- const sinon = require ( 'sinon' )
109const 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
176175const 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
You can’t perform that action at this time.
0 commit comments