{"_id":"@kwsites/file-exists","_rev":"142084","name":"@kwsites/file-exists","description":"Synchronous validation of a path existing either as a file or as a directory.","dist-tags":{"latest":"1.1.1"},"maintainers":[{"name":"steveukx","email":"steve@mydev.co"}],"time":{"modified":"2021-06-03T11:27:37.000Z","created":"2018-10-25T16:28:01.298Z","1.1.1":"2020-06-10T09:28:59.588Z","1.1.0":"2020-06-10T08:55:58.448Z","1.0.0":"2018-10-25T16:28:01.298Z"},"users":{},"author":{"name":"Steve King","email":"steve@mydev.co"},"repository":{"type":"git","url":"git+ssh://git@github.com/kwsites/file-exists.git"},"versions":{"1.1.1":{"name":"@kwsites/file-exists","version":"1.1.1","main":"./dist/index.js","types":"./dist/index.d.ts","license":"MIT","repository":{"type":"git","url":"git+ssh://git@github.com/kwsites/file-exists.git"},"author":{"name":"Steve King","email":"steve@mydev.co"},"contributors":[{"name":"Steve King","email":"steve@mydev.co"}],"scripts":{"clean":"rimraf ./dist","build":"yarn run clean && tsc","preversion":"yarn run clean && yarn run build && yarn test","postversion":"npm publish --access=public && git push && git push --tags","test":"jest --coverage","tsc":"tsc"},"devDependencies":{"@babel/core":"^7.10.1","@babel/preset-env":"^7.10.1","@babel/preset-typescript":"^7.10.1","@types/debug":"^4.1.5","@types/jest":"^26.0.0","@types/node":"^10.12.0","babel-jest":"^26.0.1","jest":"^25.3.0","rimraf":"^2.6.2","ts-node":"^8.10.2","typescript":"^3.1.3"},"dependencies":{"debug":"^4.1.1"},"gitHead":"13f0789cbd8df52588acdd185cd33de3b77fb342","description":"Synchronous validation of a path existing either as a file or as a directory.","bugs":{"url":"https://github.com/kwsites/file-exists/issues"},"homepage":"https://github.com/kwsites/file-exists#readme","_id":"@kwsites/file-exists@1.1.1","_nodeVersion":"12.16.2","_npmVersion":"6.14.4","dist":{"shasum":"ad1efcac13e1987d8dbaf235ef3be5b0d96faa99","size":4969,"noattachment":false,"key":"/@kwsites/file-exists/-/@kwsites/file-exists-1.1.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/@kwsites/file-exists/download/@kwsites/file-exists-1.1.1.tgz"},"maintainers":[{"name":"steveukx","email":"steve@mydev.co"}],"_npmUser":{"name":"steveukx","email":"steve@mydev.co"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/file-exists_1.1.1_1591781339406_0.850251292376327"},"_hasShrinkwrap":false,"publish_time":1591781339588,"_cnpm_publish_time":1591781339588},"1.1.0":{"name":"@kwsites/file-exists","version":"1.1.0","main":"./dist/index.js","types":"./dist/index.d.ts","license":"MIT","repository":{"type":"git","url":"git+ssh://git@github.com/kwsites/file-exists.git"},"author":{"name":"Steve King","email":"steve@mydev.co"},"contributors":[{"name":"Steve King","email":"steve@mydev.co"}],"scripts":{"clean":"rimraf ./dist","build":"yarn run clean && tsc","preversion":"yarn run clean && yarn run build && yarn test","postversion":"npm publish --access=public && git push && git push --tags","test":"jest --coverage","tsc":"tsc"},"devDependencies":{"@babel/core":"^7.10.1","@babel/preset-env":"^7.10.1","@babel/preset-typescript":"^7.10.1","@types/debug":"^4.1.5","@types/jest":"^26.0.0","@types/node":"^10.12.0","babel-jest":"^26.0.1","jest":"^25.3.0","rimraf":"^2.6.2","ts-node":"^8.10.2","typescript":"^3.1.3"},"dependencies":{"debug":"^4.1.1"},"gitHead":"67bb9a8aeebbed7125d4fdf2eb088a63523d7ec4","description":"Synchronous validation of a path existing either as a file or as a directory.","bugs":{"url":"https://github.com/kwsites/file-exists/issues"},"homepage":"https://github.com/kwsites/file-exists#readme","_id":"@kwsites/file-exists@1.1.0","_nodeVersion":"12.16.2","_npmVersion":"6.14.4","dist":{"shasum":"b420b88f6a9fa1cfd430384929cc17e95feb4c92","size":4996,"noattachment":false,"key":"/@kwsites/file-exists/-/@kwsites/file-exists-1.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/@kwsites/file-exists/download/@kwsites/file-exists-1.1.0.tgz"},"maintainers":[{"name":"steveukx","email":"steve@mydev.co"}],"_npmUser":{"name":"steveukx","email":"steve@mydev.co"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/file-exists_1.1.0_1591779358325_0.3292723105416213"},"_hasShrinkwrap":false,"publish_time":1591779358448,"_cnpm_publish_time":1591779358448},"1.0.0":{"name":"@kwsites/file-exists","version":"1.0.0","main":"./dist/index.js","types":"./dist/index.d.ts","license":"MIT","repository":{"type":"git","url":"git+ssh://git@github.com/kwsites/file-exists.git"},"author":{"name":"Steve King","email":"steve@mydev.co"},"contributors":[{"name":"Steve King","email":"steve@mydev.co"}],"scripts":{"clean":"rimraf ./dist","build":"yarn run clean && tsc","preversion":"yarn run clean && yarn run build && yarn test","postversion":"npm publish --access=public && git push && git push --tags","test":"echo 'Write some tests'","tsc":"tsc"},"devDependencies":{"@types/node":"^10.12.0","rimraf":"^2.6.2","typescript":"^3.1.3"},"gitHead":"b7f76091180bbae5142e9ea30318728131e90c76","description":"Synchronous validation of a path existing either as a file or as a directory.","bugs":{"url":"https://github.com/kwsites/file-exists/issues"},"homepage":"https://github.com/kwsites/file-exists#readme","_id":"@kwsites/file-exists@1.0.0","_npmVersion":"6.3.0","_nodeVersion":"8.11.1","_npmUser":{"name":"steveukx","email":"steve@mydev.co"},"dist":{"shasum":"4bd9b8476ab98383845608535c1869a6fed64469","size":2530,"noattachment":false,"key":"/@kwsites/file-exists/-/@kwsites/file-exists-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/@kwsites/file-exists/download/@kwsites/file-exists-1.0.0.tgz"},"maintainers":[{"name":"steveukx","email":"steve@mydev.co"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/file-exists_1.0.0_1540484881180_0.9827798058298394"},"_hasShrinkwrap":false,"publish_time":1540484881298,"_cnpm_publish_time":1540484881298}},"readme":"# @kwsites/file-exists\n\nSynchronous validation of a path existing either as a file or as a directory.\n\n```\nconst { exists, FILE, FOLDER, READABLE } = require('@kwsites/file-exists');\n\n// check for a folder existing\nassert(exists(__dirname, FOLDER));\nassert(!exists(__filename, FOLDER));\n\n// check for a file existing\nassert(!exists(__filename, FILE));\nassert(exists(__filename, FILE));\n\n// when no type is specified, both folders and files are allowed\nassert(exists(__dirname));\nassert(exists(__filename));\n\n// alternatively specify both files and folders\nassert(exists(__dirname, FILE + FOLDER));\n\n// or just that the path is readable (can be either a file or folder)\nassert(exists(__filename, READABLE));\n```\n\n## Troubleshooting\n\nThis library uses [debug](https://www.npmjs.com/package/debug) to handle logging,\nto enable logging, use either the environment variable:\n\n```\n\"DEBUG=@kwsites/file-exists\" node ./your-app.js \n``` \n\nOr explicitly enable logging using the `debug` library itself:\n\n```javascript\nrequire('debug').enable('@kwsites/file-exists');\n``` \n\n","_attachments":{},"homepage":"https://github.com/kwsites/file-exists#readme","bugs":{"url":"https://github.com/kwsites/file-exists/issues"},"license":"MIT"}