Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] Add a function exists() as a wrapper to the deprecated fs.exists() #14

Closed
Sv443 opened this issue Jan 29, 2021 · 0 comments · Fixed by #16
Closed

[Feature] Add a function exists() as a wrapper to the deprecated fs.exists() #14

Sv443 opened this issue Jan 29, 2021 · 0 comments · Fixed by #16
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@Sv443
Copy link
Member

Sv443 commented Jan 29, 2021

Basically this: https://github.com/Sv443/JokeAPI/blob/version/2.4.0/src/exists.js

fs.exists() was deprecated because its bevahior differed from that of other async Node.js functions. This feature would re-implement fs.exists() by only using the recommended fs.access() and returning the same value as fs.exists() did, a boolean. Additionally, this function uses path.resolve() as an additional measure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant