Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

Lines changed: 1 addition & 18 deletions
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)

AltStyle によって変換されたページ (->オリジナル) /