Reputation: 67
I am trying to use these 3 lines with import
instead..
const fs = require("fs");
const {promisify} = require("util");
const pipeline = promisify(require("stream").pipeline);
First 2 lines I think are as simple as:
import fs from 'fs';
import {promisify} from 'util';
How the hell do I convert the 3rd line though?! I appreciate the help!
Upvotes: 0
Views: 1269
Reputation: 943569
Break it up.
import stream from 'stream';
const pipeline = promisify(stream.pipeline);
Upvotes: 2