Commit 88c5b1c1 authored by Dan Allen's avatar Dan Allen

format source

parent 0c81e484
Pipeline #41673239 passed with stages
in 5 minutes and 17 seconds
......@@ -20,21 +20,22 @@ chai.use(require('chai-spies'))
chai.use(require('dirty-chai'))
module.exports = {
bufferizeContents: () => map((file, enc, next) => {
if (file.isStream()) {
const data = []
const readChunk = (chunk) => data.push(chunk)
const stream = file.contents
stream.on('data', readChunk)
stream.once('end', () => {
stream.removeListener('data', readChunk)
file.contents = Buffer.concat(data)
bufferizeContents: () =>
map((file, enc, next) => {
if (file.isStream()) {
const data = []
const readChunk = (chunk) => data.push(chunk)
const stream = file.contents
stream.on('data', readChunk)
stream.once('end', () => {
stream.removeListener('data', readChunk)
file.contents = Buffer.concat(data)
next(null, file)
})
} else {
next(null, file)
})
} else {
next(null, file)
}
}),
}
}),
deferExceptions: async (fn, ...args) => {
let deferredFn
try {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment