{"_id":"empty-dir","_rev":"2835018","name":"empty-dir","description":"Check if a directory is empty.","dist-tags":{"latest":"3.0.0"},"maintainers":[{"name":"phated","email":"blaine.bublitz@gmail.com"},{"name":"yocontra","email":""}],"time":{"modified":"2022-09-06T15:32:23.000Z","created":"2014-05-09T00:35:14.545Z","3.0.0":"2022-08-26T18:44:10.553Z","2.0.0":"2018-12-22T00:03:59.982Z","1.0.0":"2018-03-09T15:48:52.540Z","0.2.1":"2016-07-29T17:52:27.266Z","0.2.0":"2016-02-07T18:49:09.684Z","0.1.0":"2014-05-09T00:35:14.545Z"},"users":{"afc163":true,"tmurngon":true},"author":{"name":"Gulp Team","email":"team@gulpjs.com","url":"https://gulpjs.com/"},"repository":{"type":"git","url":"git+https://github.com/gulpjs/empty-dir.git"},"versions":{"3.0.0":{"name":"empty-dir","version":"3.0.0","description":"Check if a directory is empty.","author":{"name":"Gulp Team","email":"team@gulpjs.com","url":"https://gulpjs.com/"},"contributors":[{"name":"Tyler Kellen","email":"tyler@sleekcode.net"},{"name":"Jon Schlinkert","email":"jon.schlinkert@sellside.com"},{"name":"Blaine Bublitz","email":"blaine.bublitz@gmail.com"}],"repository":{"type":"git","url":"git+https://github.com/gulpjs/empty-dir.git"},"license":"MIT","engines":{"node":">=10.13.0"},"main":"index.js","scripts":{"lint":"eslint .","pretest":"npm run lint","test":"nyc mocha --async-only"},"devDependencies":{"eslint":"^7.0.0","eslint-config-gulp":"^5.0.0","eslint-plugin-node":"^11.1.0","expect":"^27.0.0","mocha":"^8.0.0","nyc":"^15.0.0","sinon":"^12.0.1"},"nyc":{"reporter":["lcov","text-summary"]},"prettier":{"singleQuote":true},"keywords":["empty","is-empty","directory","folder","check"],"gitHead":"3963107ccef87db336ac83e15205dbc42d9486fd","bugs":{"url":"https://github.com/gulpjs/empty-dir/issues"},"homepage":"https://github.com/gulpjs/empty-dir#readme","_id":"empty-dir@3.0.0","_nodeVersion":"16.14.2","_npmVersion":"8.11.0","dist":{"shasum":"abb2e5e26e197b40585b50aae3422d89a2304839","size":3055,"noattachment":false,"key":"/empty-dir/-/empty-dir-3.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/empty-dir/download/empty-dir-3.0.0.tgz"},"_npmUser":{"name":"phated","email":"blaine.bublitz@gmail.com"},"directories":{},"maintainers":[{"name":"phated","email":"blaine.bublitz@gmail.com"},{"name":"yocontra","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/empty-dir_3.0.0_1661539450381_0.9792129422855214"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2022-08-26T18:44:18.959Z","publish_time":1661539450553,"_cnpm_publish_time":1661539450553},"2.0.0":{"name":"empty-dir","version":"2.0.0","description":"Check if a directory is empty.","author":{"name":"Gulp Team","email":"team@gulpjs.com","url":"http://gulpjs.com/"},"contributors":[{"name":"Tyler Kellen","email":"tyler@sleekcode.net"},{"name":"Jon Schlinkert","email":"jon.schlinkert@sellside.com"},{"name":"Blaine Bublitz","email":"blaine.bublitz@gmail.com"}],"repository":{"type":"git","url":"git+https://github.com/gulpjs/empty-dir.git"},"license":"MIT","engines":{"node":">= 4"},"main":"index.js","scripts":{"lint":"eslint .","pretest":"npm run lint","test":"mocha --async-only","cover":"istanbul cover _mocha --report lcovonly","coveralls":"npm run cover && istanbul-coveralls"},"dependencies":{},"devDependencies":{"eslint":"^2.13.0","eslint-config-gulp":"^3.0.1","expect":"^1.20.2","istanbul":"^0.4.3","istanbul-coveralls":"^1.0.3","mocha":"^3.5.3"},"keywords":["empty","is-empty","directory","folder","check"],"gitHead":"4817e656907fe58fcb3e4b41fde7363812a8f737","bugs":{"url":"https://github.com/gulpjs/empty-dir/issues"},"homepage":"https://github.com/gulpjs/empty-dir#readme","_id":"empty-dir@2.0.0","_npmVersion":"5.6.0","_nodeVersion":"8.11.1","_npmUser":{"name":"phated","email":"blaine.bublitz@gmail.com"},"dist":{"shasum":"c59b4e73b9909d3c4bd49c1fbdaea52031fe22ac","size":3120,"noattachment":false,"key":"/empty-dir/-/empty-dir-2.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/empty-dir/download/empty-dir-2.0.0.tgz"},"maintainers":[{"name":"phated","email":"blaine.bublitz@gmail.com"},{"name":"yocontra","email":""}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/empty-dir_2.0.0_1545437039831_0.1059495481944166"},"_hasShrinkwrap":false,"publish_time":1545437039982,"_cnpm_publish_time":1545437039982},"1.0.0":{"name":"empty-dir","description":"Check if a directory is empty.","version":"1.0.0","homepage":"https://github.com/js-cli/js-empty-dir","author":{"name":"Tyler Kellen","email":"http://goingslowly.com/"},"repository":{"type":"git","url":"git+https://github.com/js-cli/js-empty-dir.git"},"bugs":{"url":"https://github.com/js-cli/js-empty-dir/issues"},"license":"MIT","main":"index.js","files":["index.js"],"engines":{"node":">= 0.8.0"},"scripts":{"test":"mocha"},"keywords":["empty","is-empty","directory","folder"],"devDependencies":{"mocha":"^3.5.3"},"gitHead":"a9d270d986b183dc5389ddb43c8f8df03c0395da","_id":"empty-dir@1.0.0","_npmVersion":"5.7.1","_nodeVersion":"9.7.1","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"dist":{"shasum":"be3ea41ca6798dc27bb9407f035888150e4c2995","size":2346,"noattachment":false,"key":"/empty-dir/-/empty-dir-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/empty-dir/download/empty-dir-1.0.0.tgz"},"maintainers":[{"name":"phated","email":"blaine.bublitz@gmail.com"},{"name":"yocontra","email":""}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/empty-dir_1.0.0_1520610532465_0.3523054457401449"},"_hasShrinkwrap":false,"publish_time":1520610532540,"_cnpm_publish_time":1520610532540},"0.2.1":{"name":"empty-dir","description":"Check if a directory is empty.","version":"0.2.1","homepage":"https://github.com/js-cli/js-empty-dir","author":{"name":"Tyler Kellen","email":"http://goingslowly.com/"},"repository":{"type":"git","url":"git+https://github.com/js-cli/js-empty-dir.git"},"bugs":{"url":"https://github.com/js-cli/js-empty-dir/issues"},"license":"MIT","main":"index.js","files":["index.js"],"engines":{"node":">= 0.8.0"},"scripts":{"test":"mocha"},"dependencies":{"fs-exists-sync":"^0.1.0"},"devDependencies":{"chai":"~1.9.1","mocha":"~1.18.2"},"keywords":["empty directory","empty dir","empty folder"],"gitHead":"76037e3785d6c5cce9e07ea1e77e55713ce5c52a","_id":"empty-dir@0.2.1","_shasum":"809ee48a1eb4ad1cb510c2572d66fd0ed84d01ab","_from":".","_npmVersion":"3.10.3","_nodeVersion":"6.3.0","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"maintainers":[{"name":"phated","email":"blaine.bublitz@gmail.com"},{"name":"yocontra","email":""}],"dist":{"shasum":"809ee48a1eb4ad1cb510c2572d66fd0ed84d01ab","size":1947,"noattachment":false,"key":"/empty-dir/-/empty-dir-0.2.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/empty-dir/download/empty-dir-0.2.1.tgz"},"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/empty-dir-0.2.1.tgz_1469814745254_0.6127190270926803"},"directories":{},"publish_time":1469814747266,"_cnpm_publish_time":1469814747266,"_hasShrinkwrap":false},"0.2.0":{"name":"empty-dir","description":"Check if a directory is empty.","version":"0.2.0","homepage":"https://github.com/tkellen/js-empty-dir","author":{"name":"Tyler Kellen","email":"http://goingslowly.com/"},"repository":{"type":"git","url":"git+https://github.com/tkellen/js-empty-dir.git"},"bugs":{"url":"https://github.com/tkellen/js-empty-dir/issues"},"license":"MIT","main":"index.js","files":["index.js"],"engines":{"node":">= 0.8.0"},"scripts":{"test":"mocha"},"dependencies":{"try-open":"^0.1.0"},"devDependencies":{"chai":"~1.9.1","mocha":"~1.18.2"},"keywords":["empty directory","empty dir","empty folder"],"gitHead":"153f3f0ded3dda3c7e2b9eaeeabd4b7a7a25dfda","_id":"empty-dir@0.2.0","_shasum":"265499aba875e9020c14baed46685b6920156d7f","_from":".","_npmVersion":"3.6.0","_nodeVersion":"4.2.6","_npmUser":{"name":"tkellen","email":"tyler@sleekcode.net"},"maintainers":[{"name":"phated","email":"blaine.bublitz@gmail.com"},{"name":"yocontra","email":""}],"dist":{"shasum":"265499aba875e9020c14baed46685b6920156d7f","size":1979,"noattachment":false,"key":"/empty-dir/-/empty-dir-0.2.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/empty-dir/download/empty-dir-0.2.0.tgz"},"_npmOperationalInternal":{"host":"packages-5-east.internal.npmjs.com","tmp":"tmp/empty-dir-0.2.0.tgz_1454870948426_0.9172745416872203"},"directories":{},"publish_time":1454870949684,"_cnpm_publish_time":1454870949684,"_hasShrinkwrap":false},"0.1.0":{"name":"empty-dir","description":"Check if a directory is empty.","version":"0.1.0","homepage":"https://github.com/tkellen/node-empty-dir","author":{"name":"Tyler Kellen","url":"http://goingslowly.com/"},"repository":{"type":"git","url":"git://github.com/tkellen/node-empty-dir.git"},"bugs":{"url":"https://github.com/tkellen/node-empty-dir/issues"},"licenses":[{"type":"MIT","url":"https://github.com/tkellen/node-empty-dir/blob/master/LICENSE"}],"main":"index.js","engines":{"node":">= 0.8.0"},"scripts":{"test":"mocha -R spec test"},"devDependencies":{"chai":"~1.9.1","mocha":"~1.18.2"},"keywords":["empty directory","empty dir","empty folder"],"_id":"empty-dir@0.1.0","dist":{"shasum":"4915bd8b63773c3f458b2dc50339c908849c84f0","size":1817,"noattachment":false,"key":"/empty-dir/-/empty-dir-0.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/empty-dir/download/empty-dir-0.1.0.tgz"},"_from":".","_npmVersion":"1.4.3","_npmUser":{"name":"tkellen","email":"tyler@sleekcode.net"},"maintainers":[{"name":"phated","email":"blaine.bublitz@gmail.com"},{"name":"yocontra","email":""}],"directories":{},"publish_time":1399595714545,"_cnpm_publish_time":1399595714545,"_hasShrinkwrap":false}},"readme":"<p align=\"center\">\n  <a href=\"http://gulpjs.com\">\n    <img height=\"257\" width=\"114\" src=\"https://raw.githubusercontent.com/gulpjs/artwork/master/gulp-2x.png\">\n  </a>\n</p>\n\n# empty-dir\n\n[![NPM version][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] [![Build Status][ci-image]][ci-url] [![Coveralls Status][coveralls-image]][coveralls-url]\n\nCheck if a directory is empty.\n\n## Usage\n\n```js\nvar emptyDir = require('empty-dir');\n\n// Using an error-back\nemptyDir('./', function (err, result) {\n  if (err) {\n    console.error(err);\n  } else {\n    console.log('Directory is empty:', result);\n  }\n});\n\n// Using a Promise\nemptyDir('./').then(function (result) {\n  console.log('Directory is empty:', result);\n});\n\nvar result = emptyDir.sync('./test/empty');\nconsole.log('Directory is empty:', result);\n```\n\n## API\n\n### `emptyDir(paths, [filterFunction], [callback])`\n\nTakes a path string or array of path strings and returns a Promise. Checks if the given paths are empty and resolves with a boolean indicating if the paths are empty directories. Optionally takes a filter function to filter out files that cause false positives. Also, can take a node-style callback function instead of returning a Promise.\n\n### `emptyDir.sync(paths, [filterFunction])`\n\nSame as the above API but operates and returns synchronously. An error will be thrown.\n\n#### Filter function\n\nBoth async and sync take a filter function as the second argument, to ignore files like `.DS_Store` on mac or `Thumbs.db` on windows from causing false-negatives.\n\n```js\nvar emptyDir = require('empty-dir');\n\nfunction filter(filepath) {\n  return /(Thumbs\\.db|\\.DS_Store)$/i.test(filepath);\n}\n\nemptyDir('./', filter, function (err, isEmpty) {\n  if (err) {\n    console.error(err);\n  } else {\n    console.log('Directory is empty:', isEmpty);\n  }\n});\n\nvar isEmpty = emptyDir.sync('./test/empty', filter);\nconsole.log('Directory is empty:', isEmpty);\n```\n\n#### Promises\n\nGlobal promises are required for this module. If you are using a platform that doesn't have promise support, you'll need to polyfill Promise on the global.\n\n```js\nglobal.Promise = require('insert-your-promise-polyfill-here');\n\nvar emptyDir = require('empty-dir');\n\nemptyDir('./').then(function (result) {\n  console.log('Directory is empty:', result);\n});\n```\n\n## License\n\nMIT\n\n<!-- prettier-ignore-start -->\n[downloads-image]: https://img.shields.io/npm/dm/empty-dir.svg?style=flat-square\n[npm-url]: https://www.npmjs.com/package/empty-dir\n[npm-image]: https://img.shields.io/npm/v/empty-dir.svg?style=flat-square\n\n[ci-url]: https://github.com/gulpjs/empty-dir/actions?query=workflow:dev\n[ci-image]: https://img.shields.io/github/workflow/status/gulpjs/empty-dir/dev?style=flat-square\n\n[coveralls-url]: https://coveralls.io/r/gulpjs/empty-dir\n[coveralls-image]: https://img.shields.io/coveralls/gulpjs/empty-dir/master.svg?style=flat-square\n<!-- prettier-ignore-end -->\n","_attachments":{},"homepage":"https://github.com/gulpjs/empty-dir#readme","bugs":{"url":"https://github.com/gulpjs/empty-dir/issues"},"license":"MIT"}