GitShow/sindresorhus/path-exists-cli
sindresorhus

path-exists-cli

Check if a path exists

by sindresorhus
Star on GitHubForknpm

JavaScript

26 stars6 forks3 contributorsQuiet · 2y agoSince 2016v2.0.0MIT

Meet the team

See all 3 on GitHub →
sindresorhus
sindresorhus7 contributions
mk-pmb
mk-pmb1 contribution
Richienb
Richienb1 contribution

Languages

View on GitHub →
JavaScript100%

Commit activity

Last 12 weeks · 0 commits

Full graph →

Community health

4 of 6 standards met

Community profile →
85
✓README✓License✓Contributing✓Code of Conduct○Issue Template○PR Template

Recent fixes

View closed PRs →
Richienb
Move to GitHub ActionsMergedPR
Richienb · 5y ago
mk-pmb
readme: advantage over GNU `test`MergedPR

To clarify, from GNU coreutils works fine on Windows and Mac OS as well; the advantage is just about which programs we can expect to be installed on systems where this package is used.

mk-pmb · 10y ago
yamadapc
Ahm... Do you know about `test`?ClosedIssue

Sorry if this isn't relevant. This repository showed up on my GitHub newsletter. Do you know the shell's if statement is actually just syntactic sugar for the coreutils utility? http://www.gnu.org/software/coreutils/manual/html_node/test-invocation.html#test-invocation So on pretty much any shell, you can run: And more... You can test for a file's length, it's permissions, it's type, if it's executable, if it's a socket, if it's newer than another file... You can make assertions over strings etc. This specific case of can be rewritten as: This is also how loops work in the shell, as far as I recall. Heh... A loop that spawns a Node.js runtime on every iteration would be pretty bad. I just think it's a little weird for this kind of stuff to exist and even require another module to work... This would be a pretty good example of going to far with modules, don't you think? from coreutils is an example of a useful, fast implementation of something that does 1 thing in the UNIX way... Which sort of means constructing a verb that's modular enough to be composed, but useful enough... A verb**. It seems like if this utility's approach was going to write coreutils, instead of , there'd be:

yamadapc · 10y ago
Structured data for AI agents

Repository: sindresorhus/path-exists-cli. Description: Check if a path exists Stars: 26, Forks: 6. Primary language: JavaScript. Languages: JavaScript (100%). License: MIT. Latest release: v2.0.0 (5y ago). Open PRs: 0, open issues: 0. Last activity: 2y ago. Community health: 85%. Top contributors: sindresorhus, mk-pmb, Richienb.

·@ofershap

Replace github.com with gitshow.dev