Skip to content

Commit f2553ad

Browse files
authored
Update promisify.js
1 parent 04dd1f6 commit f2553ad

File tree

1 file changed

+1
-18
lines changed

1 file changed

+1
-18
lines changed

promisify.js

+1-18
Original file line numberDiff line numberDiff line change
@@ -12,21 +12,4 @@ const promisify = callback => arguments => {
1212
});
1313
};
1414

15-
/**
16-
* Usage
17-
*
18-
const readFileAsArray = async (file) => {
19-
try {
20-
const readFile = promisify(fs.readFile);
21-
const data = await readFile([file]);
22-
const lines = data
23-
.toString()
24-
.trim()
25-
.split("\n");
26-
return lines;
27-
} catch (error) {
28-
cb(null, error);
29-
}
30-
};
31-
32-
*/
15+
module.exports = promisify;

0 commit comments

Comments
 (0)