Skip to content

Conversation

@SimenB
Copy link
Contributor

@SimenB SimenB commented Oct 15, 2016

See nodejs/node#8364

Might even deprecate the whole module? Unsure how useful an asynchronous version is

index.js Outdated
return false;
}
};
module.exports.sync = fs.existsSync;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not interested in changing the behavior at this point. It would also make it inconsistent with the async version. Documentation change is enough.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's the exact same behavior though, except for dropping the overhead of try-catching? Unless I'm missing something?

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's the exact same behavior though

They call different native methods internally.

except for dropping the overhead of try-catching?

Still try/catch: https://github.com/nodejs/node/blob/9bb250ba340a805b6189b9ad39716722e6c41618/lib/fs.js#L243-L251

@SimenB
Copy link
Contributor Author

SimenB commented Oct 17, 2016

@sindresorhus updated

@sindresorhus sindresorhus merged commit 67c0725 into sindresorhus:master Oct 17, 2016
@SimenB SimenB deleted the fs-access-sync branch October 17, 2016 17:13
sindresorhus pushed a commit that referenced this pull request Oct 17, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants