Skip to content

Commit

Permalink
use streamx Transform
Browse files Browse the repository at this point in the history
  • Loading branch information
gmaclennan committed Nov 10, 2023
1 parent d35d3f3 commit 0249e74
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/blob-api.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import fs from 'node:fs'
import { Transform } from 'node:stream'
// @ts-ignore - missing from streamx types
import { pipelinePromise as pipeline } from 'streamx'
// @ts-ignore - pipelinePromise missing from streamx types
import { Transform, pipelinePromise as pipeline } from 'streamx'
import { createHash, randomBytes } from 'node:crypto'

/** @typedef {import('./types.js').BlobId} BlobId */
Expand Down Expand Up @@ -96,7 +95,7 @@ export class BlobApi {
*/
function hashTransform(hash) {
return new Transform({
transform: (data, _, cb) => {
transform: (data, cb) => {
hash.update(data)
cb(null, data)
},
Expand Down

0 comments on commit 0249e74

Please sign in to comment.