Skip to content

Commit 987ae1d

Browse files
committed
Refactor namespace
1 parent 09400bb commit 987ae1d

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

JavaScript/5-compose-async.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
'use strict';
22

3-
global.api = {};
4-
api.fs = require('fs');
3+
const fs = require('fs');
54

65
const reduceAsync = (items, performer, done, initialValue) => {
76
const nseted = initialValue === undefined;
@@ -55,7 +54,7 @@ function wrapAsync(callback) {
5554

5655
function read(file, charset, callback) {
5756
console.dir({ read: { file, callback } });
58-
api.fs.readFile(file, charset, callback);
57+
fs.readFile(file, charset, callback);
5958
}
6059

6160
function parse(data, callback) {

0 commit comments

Comments
 (0)