{"_id":"try-open","_rev":"63017","name":"try-open","description":"Tries to open a file using fs.openSync (only necessary with sync), fails gracefully if the file path does not exist on the file system. Since fs.existsSync has been deprecated, this can be used as an alternative.","dist-tags":{"latest":"0.1.3"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"time":{"modified":"2021-06-03T10:21:20.000Z","created":"2015-12-20T08:43:41.311Z","0.1.3":"2016-04-09T05:17:03.595Z","0.1.2":"2016-02-22T01:06:40.931Z","0.1.1":"2016-02-17T03:09:43.959Z","0.1.0":"2015-12-20T08:43:41.311Z"},"users":{},"author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git+https://github.com/jonschlinkert/try-open.git"},"versions":{"0.1.3":{"name":"try-open","description":"Tries to open a file using fs.openSync (only necessary with sync), fails gracefully if the file path does not exist on the file system. Since fs.existsSync has been deprecated, this can be used as an alternative.","version":"0.1.3","homepage":"https://github.com/jonschlinkert/try-open","author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git+https://github.com/jonschlinkert/try-open.git"},"bugs":{"url":"https://github.com/jonschlinkert/try-open/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":"*"},"keywords":["open","try"],"verb":{"toc":false,"layout":"default","tasks":["readme"],"plugins":["gulp-format-md"],"related":{"list":["copy","delete","fs-utils","write"]}},"gitHead":"f29777b0471fa6d2943f24eb846c1dffb326be73","_id":"try-open@0.1.3","_shasum":"28e29520593ea8c610712a0bb6f45fbe4b3b6a59","_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":"28e29520593ea8c610712a0bb6f45fbe4b3b6a59","size":2438,"noattachment":false,"key":"/try-open/-/try-open-0.1.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/try-open/download/try-open-0.1.3.tgz"},"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/try-open-0.1.3.tgz_1460179021300_0.10572121199220419"},"directories":{},"publish_time":1460179023595,"_cnpm_publish_time":1460179023595,"_hasShrinkwrap":false},"0.1.2":{"name":"try-open","description":"Tries to open a file using fs.openSync (only necessary with sync), fails gracefully if the file path does not exist on the file system. Since fs.existsSync has been deprecated, this can be used as an alternative.","version":"0.1.2","homepage":"https://github.com/jonschlinkert/try-open","author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git+https://github.com/jonschlinkert/try-open.git"},"bugs":{"url":"https://github.com/jonschlinkert/try-open/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":"*"},"verb":{"toc":false,"layout":"default","tasks":["readme"],"plugins":["gulp-format-md"],"related":{"list":["copy","delete","fs-utils","write"]}},"gitHead":"003e46eb2ee55558e1d455d7d62d9f1e77bbf9bc","_id":"try-open@0.1.2","_shasum":"b5e5835cd963e626ca5f1de1935eeeeb89e7f275","_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":"b5e5835cd963e626ca5f1de1935eeeeb89e7f275","size":2347,"noattachment":false,"key":"/try-open/-/try-open-0.1.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/try-open/download/try-open-0.1.2.tgz"},"_npmOperationalInternal":{"host":"packages-5-east.internal.npmjs.com","tmp":"tmp/try-open-0.1.2.tgz_1456103197947_0.4528044897597283"},"directories":{},"publish_time":1456103200931,"_cnpm_publish_time":1456103200931,"_hasShrinkwrap":false},"0.1.1":{"name":"try-open","description":"Tries to open a file using fs.openSync (only necessary with sync), fails gracefully if the file path does not exist on the file system. Since fs.existsSync has been deprecated, this can be used as an alternative.","version":"0.1.1","homepage":"https://github.com/jonschlinkert/try-open","author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git+https://github.com/jonschlinkert/try-open.git"},"bugs":{"url":"https://github.com/jonschlinkert/try-open/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":"*"},"verb":{"toc":false,"layout":"default","tasks":["readme"],"plugins":["gulp-format-md"],"related":{"list":["copy","delete","fs-utils","write"]}},"gitHead":"003e46eb2ee55558e1d455d7d62d9f1e77bbf9bc","_id":"try-open@0.1.1","_shasum":"3266dff1a6d5978e93a3fabca1116f9dae6d34ee","_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":"3266dff1a6d5978e93a3fabca1116f9dae6d34ee","size":2330,"noattachment":false,"key":"/try-open/-/try-open-0.1.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/try-open/download/try-open-0.1.1.tgz"},"_npmOperationalInternal":{"host":"packages-9-west.internal.npmjs.com","tmp":"tmp/try-open-0.1.1.tgz_1455678580083_0.7894321370404214"},"directories":{},"publish_time":1455678583959,"_cnpm_publish_time":1455678583959,"_hasShrinkwrap":false},"0.1.0":{"name":"try-open","description":"Tries to open a file using fs.openSync (only necessary with sync), fails gracefully if the file path does not exist on the file system. Since fs.existsSync has been deprecated, this can be used as an alternative.","version":"0.1.0","homepage":"https://github.com/jonschlinkert/try-open","author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git+https://github.com/jonschlinkert/try-open.git"},"bugs":{"url":"https://github.com/jonschlinkert/try-open/issues"},"license":"MIT","files":["index.js"],"main":"index.js","engines":{"node":">=0.10.0"},"scripts":{"test":"mocha"},"devDependencies":{"mocha":"*"},"verb":{"related":{"list":["copy","delete","fs-utils","write"]},"plugins":["gulp-format-md"]},"gitHead":"e5d39e49de34aed828665c9d4a1d9b91ffa163b3","_id":"try-open@0.1.0","_shasum":"cca43dd11d2cc5422a66184c2bb879dd68605d16","_from":".","_npmVersion":"3.3.6","_nodeVersion":"5.0.0","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"dist":{"shasum":"cca43dd11d2cc5422a66184c2bb879dd68605d16","size":2176,"noattachment":false,"key":"/try-open/-/try-open-0.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/try-open/download/try-open-0.1.0.tgz"},"directories":{},"publish_time":1450601021311,"_cnpm_publish_time":1450601021311,"_hasShrinkwrap":false}},"readme":"# try-open [![NPM version](https://img.shields.io/npm/v/try-open.svg?style=flat)](https://www.npmjs.com/package/try-open) [![NPM downloads](https://img.shields.io/npm/dm/try-open.svg?style=flat)](https://npmjs.org/package/try-open) [![Build Status](https://img.shields.io/travis/jonschlinkert/try-open.svg?style=flat)](https://travis-ci.org/jonschlinkert/try-open)\n\n> Tries to open a file using fs.openSync (only necessary with sync), fails gracefully if the file path does not exist on the file system. Since fs.existsSync has been deprecated, this can be used as an alternative.\n\n## Install\nInstall with [npm](https://www.npmjs.com/):\n\n```sh\n$ npm install try-open --save\n```\n\nSee the node.js [fs.open documentation](https://nodejs.org/api/fs.html#fs_fs_open_path_flags_mode_callback) for more details.\n\n## Usage\n\n```js\nvar fs = require('fs');\nvar tryOpen = require('try-open');\n\nvar fd = tryOpen('package.json', 'r');\n//=> 17\n\n// close the file\nfs.closeSync(fd);\n```\n\n## Related projects\n\nYou might also be interested in these projects: \n\n* [copy](https://www.npmjs.com/package/copy): Copy files or directories using globs. | [homepage](https://github.com/jonschlinkert/copy)\n* [delete](https://www.npmjs.com/package/delete): Delete files and folders and any intermediate directories if they exist (sync and async). | [homepage](https://github.com/jonschlinkert/delete)\n* [fs-utils](https://www.npmjs.com/package/fs-utils): fs extras and utilities to extend the node.js file system module. Used in Assemble and… [more](https://www.npmjs.com/package/fs-utils) | [homepage](https://github.com/assemble/fs-utils)\n* [write](https://www.npmjs.com/package/write): Write files to disk, creating intermediate directories if they don't exist. | [homepage](https://github.com/jonschlinkert/write)  \n\n## Contributing\nPull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/try-open/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/try-open/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","_attachments":{},"homepage":"https://github.com/jonschlinkert/try-open","bugs":{"url":"https://github.com/jonschlinkert/try-open/issues"},"license":"MIT"}