{"_id":"fs-exists-sync","_rev":"12863","name":"fs-exists-sync","description":"Drop-in replacement for `fs.existsSync` with zero dependencies. Other libs I found either have crucial differences from fs.existsSync, or unnecessary dependencies. See README.md for more info.","dist-tags":{"latest":"0.1.0"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"time":{"modified":"2021-06-03T09:58:17.000Z","created":"2016-04-09T11:40:26.287Z","0.1.0":"2016-04-09T11:40:26.287Z"},"users":{},"author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git+https://github.com/jonschlinkert/fs-exists-sync.git"},"versions":{"0.1.0":{"name":"fs-exists-sync","description":"Drop-in replacement for `fs.existsSync` with zero dependencies. Other libs I found either have crucial differences from fs.existsSync, or unnecessary dependencies. See README.md for more info.","version":"0.1.0","homepage":"https://github.com/jonschlinkert/fs-exists-sync","author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git+https://github.com/jonschlinkert/fs-exists-sync.git"},"bugs":{"url":"https://github.com/jonschlinkert/fs-exists-sync/issues"},"license":"MIT","files":["index.js"],"main":"index.js","engines":{"node":">=0.10.0"},"scripts":{"test":"mocha"},"devDependencies":{"gulp-format-md":"^0.1.7","mocha":"^2.4.5"},"keywords":["access","check","exist","exists","file","file-system","filepath","filesystem","fs","is-file","isfile","path","stat","sync"],"verb":{"layout":"default","plugins":["gulp-format-md"],"reflinks":["verb","path-exists","fs-exists","file-exists","exists"],"related":{"list":["try-open","parse-filepath","is-absolute"]},"run":true,"toc":false,"tasks":["readme"],"lint":{"reflinks":true}},"gitHead":"3b44654977775bac2d1151520c9b6257249a6374","_id":"fs-exists-sync@0.1.0","_shasum":"982d6893af918e72d08dec9e8673ff2b5a8d6add","_from":".","_npmVersion":"3.6.0","_nodeVersion":"5.5.0","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"dist":{"shasum":"982d6893af918e72d08dec9e8673ff2b5a8d6add","size":2578,"noattachment":false,"key":"/fs-exists-sync/-/fs-exists-sync-0.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/fs-exists-sync/download/fs-exists-sync-0.1.0.tgz"},"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/fs-exists-sync-0.1.0.tgz_1460202025245_0.6282676137052476"},"directories":{},"publish_time":1460202026287,"_cnpm_publish_time":1460202026287,"_hasShrinkwrap":false}},"readme":"# fs-exists-sync [![NPM version](https://img.shields.io/npm/v/fs-exists-sync.svg?style=flat)](https://www.npmjs.com/package/fs-exists-sync) [![NPM downloads](https://img.shields.io/npm/dm/fs-exists-sync.svg?style=flat)](https://npmjs.org/package/fs-exists-sync) [![Build Status](https://img.shields.io/travis/jonschlinkert/fs-exists-sync.svg?style=flat)](https://travis-ci.org/jonschlinkert/fs-exists-sync)\n\n> Drop-in replacement for `fs.existsSync` with zero dependencies. Other libs I found either have crucial differences from fs.existsSync, or unnecessary dependencies. See README.md for more info.\n\n## Install\nInstall with [npm](https://www.npmjs.com/):\n\n```sh\n$ npm install fs-exists-sync --save\n```\n\n## Usage\n\n```js\nvar exists = require('fs-exists-sync');\n\nconsole.log(exists('.'));\n//=> true\nconsole.log(exists(process.cwd()));\n//=> true\nconsole.log(exists('README.md'));\n//=> true\nconsole.log(exists('foo.txt'));\n//=> false\nconsole.log(exists(''));\n//=> false\nconsole.log(exists());\n//=> false\n```\n\n## Why another \"exists\" lib?\n\nI just want a _simple replacement for `fs.existsSync`_. Here is what I found:\n\n- [path-exists][]: Has dependencies to support a promises API\n- [fs-exists][]: async only\n- [file-exists][]: returns `false` if the path exists but is a directory.\n- [exists][]: nothing to do with `fs`. \n\n## API\n\n## Related projects\n\nYou might also be interested in these projects: \n\n* [is-absolute](https://www.npmjs.com/package/is-absolute): Polyfill for node.js `path.isAbolute`. Returns true if a file path is absolute. | [homepage](https://github.com/jonschlinkert/is-absolute)\n* [parse-filepath](https://www.npmjs.com/package/parse-filepath): Pollyfill for node.js `path.parse`, parses a filepath into an object. | [homepage](https://github.com/jonschlinkert/parse-filepath)\n* [try-open](https://www.npmjs.com/package/try-open): Tries to open a file using fs.openSync (only necessary with sync), fails gracefully if the… [more](https://www.npmjs.com/package/try-open) | [homepage](https://github.com/jonschlinkert/try-open)  \n\n## Contributing\nPull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/fs-exists-sync/issues/new).\n\n## Building docs\nGenerate readme and API documentation with [verb][]:\n\n```sh\n$ npm install verb && npm run docs\n```\n\nOr, if [verb][] is installed globally:\n\n```sh\n$ verb\n```\n\n## Running tests\nInstall dev dependencies:\n\n```sh\n$ npm install -d && npm test\n```\n\n## Author\n**Jon Schlinkert**\n\n+ [github/jonschlinkert](https://github.com/jonschlinkert)\n+ [twitter/jonschlinkert](http://twitter.com/jonschlinkert)\n\n## License\nCopyright © 2016, [Jon Schlinkert](https://github.com/jonschlinkert).\nReleased under the [MIT license](https://github.com/jonschlinkert/fs-exists-sync/blob/master/LICENSE).\n\n***\n\n_This file was generated by [verb](https://github.com/verbose/verb), v0.9.0, on April 09, 2016._\n\n[verb]: https://github.com/verbose/verb\n[path-exists]: https://github.com/sindresorhus/path-exists\n[fs-exists]: https://github.com/meryn/fs-exists\n[file-exists]: https://github.com/scottcorgan/file-exists\n[exists]: https://github.com/tjmehta/exists\n\n","_attachments":{},"homepage":"https://github.com/jonschlinkert/fs-exists-sync","bugs":{"url":"https://github.com/jonschlinkert/fs-exists-sync/issues"},"license":"MIT"}