Skip to content

Commit

Permalink
refactor: move default on top
Browse files Browse the repository at this point in the history
  • Loading branch information
aralroca committed Aug 26, 2024
1 parent 6f5967d commit b771f25
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
import fs from 'node:fs';
import { pipeline } from 'node:stream';

const defaultIsBunRuntime = typeof Bun !== 'undefined';

export default function getReadableStreamFromPath(
filePath: string,
isBunRuntime = typeof Bun !== 'undefined',
isBunRuntime = defaultIsBunRuntime,
) {
if (!fs.existsSync(filePath)) return null;

Expand Down

0 comments on commit b771f25

Please sign in to comment.