Skip to content

Commit c38891b

Browse files
committed
Remove polyfill code for old node JS versions
1 parent 7864743 commit c38891b

File tree

1 file changed

+8
-12
lines changed

1 file changed

+8
-12
lines changed

lib/fs-helpers.js

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -42,18 +42,14 @@ var helpers = {
4242
*
4343
* @param {String} path
4444
*/
45-
exists: typeof fs.access === 'function' ?
46-
function (path) {
47-
try {
48-
fs.accessSync(path);
49-
return true;
50-
} catch (err) {
51-
return false;
52-
}
53-
} :
54-
function (path) {
55-
return fs.existsSync(path);
56-
},
45+
exists: function (path) {
46+
try {
47+
fs.accessSync(path);
48+
return true;
49+
} catch (err) {
50+
return false;
51+
}
52+
},
5753

5854
/**
5955
* @param {String} path

0 commit comments

Comments
 (0)