Permalink
Browse files

Remove hacks for Node v0.10

Note: We already lost Node v0.10 support when switching to ESLint 3
(which now requires at least Node v4).

standard v8 won't support less than Node v4.
  • Loading branch information...
1 parent 3bd0b23 commit b43d0ce37fd0a0cb143eec4933d598c5476ad436 @feross committed Aug 10, 2016
Showing with 1 addition and 14 deletions.
  1. +1 −14 test/clone.js
View
@@ -68,7 +68,7 @@ test('test github repos that use `standard`', function (t) {
var url = pkg.repo + '.git'
var folder = path.join(TMP, name)
return function (cb) {
- access(path.join(TMP, name), fs.R_OK | fs.W_OK, function (err) {
+ fs.access(path.join(TMP, name), fs.R_OK | fs.W_OK, function (err) {
if (argv.offline) {
if (err) {
t.pass('SKIPPING (offline): ' + name + ' (' + pkg.repo + ')')
@@ -130,16 +130,3 @@ function spawn (command, args, opts, cb) {
})
return child
}
-
-function access (path, mode, callback) {
- if (typeof mode === 'function') {
- return access(path, null, callback)
- }
-
- // Node v0.10 lacks `fs.access`, which is faster, so fallback to `fs.stat`
- if (typeof fs.access === 'function') {
- fs.access(path, mode, callback)
- } else {
- fs.stat(path, callback)
- }
-}

0 comments on commit b43d0ce

Please sign in to comment.