Skip to content
This repository has been archived by the owner on Mar 10, 2020. It is now read-only.

Commit

Permalink
refactor: remove unused function
Browse files Browse the repository at this point in the history
  • Loading branch information
vmx committed Feb 23, 2018
1 parent f81dce5 commit cc0f5b3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 19 deletions.
19 changes: 1 addition & 18 deletions src/utils/converter.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
'use strict'

const pump = require('pump')
const TransformStream = require('readable-stream').Transform
const streamToValue = require('./stream-to-value')

/*
Transforms a stream of {Name, Hash} objects to include size
Expand Down Expand Up @@ -43,19 +41,4 @@ class ConverterStream extends TransformStream {
}
}

function converter (inputStream, callback) {
const outputStream = new ConverterStream()
pump(
inputStream,
outputStream,
(err) => {
if (err) {
callback(err)
}
})

streamToValue(outputStream, callback)
}

exports = module.exports = converter
exports.ConverterStream = ConverterStream
module.exports = ConverterStream
2 changes: 1 addition & 1 deletion src/utils/send-files-stream.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const isStream = require('is-stream')
const once = require('once')
const prepareFile = require('./prepare-file')
const Multipart = require('./multipart')
const Converter = require('./converter').ConverterStream
const Converter = require('./converter')

function headers (file) {
const name = file.path
Expand Down

0 comments on commit cc0f5b3

Please sign in to comment.