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

Add findUp.exists() and findUp.sync.exists() #41

Merged
merged 11 commits into from Jun 17, 2019

Conversation

TiagoDanin
Copy link
Contributor

@TiagoDanin TiagoDanin commented May 4, 2019

Closes #37

  • Documentation
  • TypeScript Definition
  • Utility Methods

index.js Outdated Show resolved Hide resolved
index.d.ts Outdated Show resolved Hide resolved
index.js Outdated Show resolved Hide resolved
@TiagoDanin
Copy link
Contributor Author

index.d.ts

declare const findUp: {
	// ... //
	sync.exists(path: string): boolean; //This does not create a nested function (?)
	// ... //
}

@TiagoDanin TiagoDanin changed the title Add utility methods [WIP] Add utility methods May 5, 2019
index.d.ts Outdated Show resolved Hide resolved
@TiagoDanin
Copy link
Contributor Author

@coreyfarrell I believe this is a hard link [Source]

absolute.fileLink = path.join(absolute.fixtureDirectory, name.fileLink);

@sindresorhus create link.js with ln -s fixture/baz.js fixture/link.js and run pathExists('fixture/link.js') // false, is that right ?

@coreyfarrell
Copy link
Contributor

@TiagoDanin it might be a hard link in Windows. The symbolic link tests need to be skipped under Windows (see other tests which try to match the links).

@TiagoDanin TiagoDanin changed the title [WIP] Add utility methods Add utility methods May 9, 2019
@sindresorhus
Copy link
Owner

Because of #42, we no longer need the isFile/isDirectory methods. We only need the "exists" methods.

test.js Outdated Show resolved Hide resolved
index.d.ts Outdated Show resolved Hide resolved
index.d.ts Outdated Show resolved Hide resolved
@sindresorhus
Copy link
Owner

@coreyfarrell Looks good to you?

Copy link
Contributor

@coreyfarrell coreyfarrell left a comment

Choose a reason for hiding this comment

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

@sindresorhus the code looks good to me. I made a couple comments about the docs, up to you if you want those minor tweaks made.

index.d.ts Outdated Show resolved Hide resolved
readme.md Outdated Show resolved Hide resolved
index.d.ts Outdated Show resolved Hide resolved
@sindresorhus sindresorhus changed the title Add utility methods Add findUp.exists() and findUp.sync.exists() Jun 17, 2019
@sindresorhus sindresorhus merged commit 56b779b into sindresorhus:master Jun 17, 2019
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.

Add utility methods to check if the path exists
4 participants