{"_id":"hyperdrive-count-import","_rev":"6-a18966450297faed5bdd58b730652387","name":"hyperdrive-count-import","description":"Count and import a directory to hyperdrive","dist-tags":{"latest":"1.1.0"},"versions":{"1.0.0":{"name":"hyperdrive-count-import","version":"1.0.0","description":"Count and import a directory to hyperdrive","main":"index.js","scripts":{"test":"standard"},"repository":{"type":"git","url":"git+https://github.com/joehand/hyperdrive-count-import.git"},"author":{"name":"Joe Hand","email":"joe@hand.email","url":"https://joeahand.com/"},"license":"MIT","bugs":{"url":"https://github.com/joehand/hyperdrive-count-import/issues"},"homepage":"https://github.com/joehand/hyperdrive-count-import#readme","dependencies":{"anymatch":"^1.3.0","folder-walker":"^3.0.0","hyperdrive-import-files":"^2.4.2","stream-each":"^1.1.2"},"gitHead":"4156d20315b0b39e42e511f1c6db1534b16be55d","_id":"hyperdrive-count-import@1.0.0","_shasum":"e71c1a447b2c7cd2d8adf4ae82d73035eb312ac2","_from":".","_npmVersion":"3.10.6","_nodeVersion":"6.5.0","_npmUser":{"name":"jhand","email":"joe@hand.email"},"dist":{"shasum":"e71c1a447b2c7cd2d8adf4ae82d73035eb312ac2","tarball":"https://registry.npmjs.org/hyperdrive-count-import/-/hyperdrive-count-import-1.0.0.tgz","integrity":"sha512-7Um3yShzlSqHuLdPDqZLkVeR10yGfPEeByZDLoCdzcSiwsohSGhJLiN7Qg4OyUNcRT/9XgBqPtTxYCOQhXUd/Q==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDdHzm4UXKE+mA7C8vs7KhQBQF8G86RZMdrNHs/cwiZgQIhAOBGd/3lFJY1nLr0Cu6Y0m9RtpLFwod3rYfKxsB4JQ5I"}]},"maintainers":[{"name":"jhand","email":"joe@hand.email"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/hyperdrive-count-import-1.0.0.tgz_1478285502563_0.4503969883080572"}},"1.0.1":{"name":"hyperdrive-count-import","version":"1.0.1","description":"Count and import a directory to hyperdrive","main":"index.js","scripts":{"test":"standard"},"repository":{"type":"git","url":"git+https://github.com/joehand/hyperdrive-count-import.git"},"author":{"name":"Joe Hand","email":"joe@hand.email","url":"https://joeahand.com/"},"license":"MIT","bugs":{"url":"https://github.com/joehand/hyperdrive-count-import/issues"},"homepage":"https://github.com/joehand/hyperdrive-count-import#readme","dependencies":{"anymatch":"^1.3.0","folder-walker":"^3.0.0","hyperdrive-import-files":"^2.4.2","stream-each":"^1.1.2"},"gitHead":"165905d8bd9f449316e5d607e4cd504ed7677848","_id":"hyperdrive-count-import@1.0.1","_shasum":"d6f0a6e2d12a6ff34d0fd57cf66a4aada1717874","_from":".","_npmVersion":"3.10.8","_nodeVersion":"6.9.1","_npmUser":{"name":"jhand","email":"joe@hand.email"},"dist":{"shasum":"d6f0a6e2d12a6ff34d0fd57cf66a4aada1717874","tarball":"https://registry.npmjs.org/hyperdrive-count-import/-/hyperdrive-count-import-1.0.1.tgz","integrity":"sha512-YIeMVN0FsN0TJhUpmf4/yPKSXJOf8+SXbmlX9LCnJvvrZHEIN9pSySJClU88by7ZEg0BwismSbalda7/KJYRKQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCx4Qt9axmlyYLw4XKXsIgSKNr5zZejlahMeYKD4lGLUQIhAPfZzz8i0ptb0UiB7e/CNOtjqWQ76UrAR6xbVrUjAPzE"}]},"maintainers":[{"name":"jhand","email":"joe@hand.email"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/hyperdrive-count-import-1.0.1.tgz_1482507276045_0.9225380208808929"}},"1.0.2":{"name":"hyperdrive-count-import","version":"1.0.2","description":"Count and import a directory to hyperdrive","main":"index.js","scripts":{"test":"standard"},"repository":{"type":"git","url":"git+https://github.com/joehand/hyperdrive-count-import.git"},"author":{"name":"Joe Hand","email":"joe@hand.email","url":"https://joeahand.com/"},"license":"MIT","bugs":{"url":"https://github.com/joehand/hyperdrive-count-import/issues"},"homepage":"https://github.com/joehand/hyperdrive-count-import#readme","dependencies":{"anymatch":"^1.3.0","folder-walker":"^3.0.0","hyperdrive-import-files":"^2.7.0","stream-each":"^1.1.2"},"gitHead":"15b5b27b91ccd209f9321472edeb5dd64005c9ef","_id":"hyperdrive-count-import@1.0.2","_shasum":"d3ef9a40266bb6787a5f245d106b2c0f70ffbb7a","_from":".","_npmVersion":"3.10.8","_nodeVersion":"6.9.1","_npmUser":{"name":"jhand","email":"joe@hand.email"},"dist":{"shasum":"d3ef9a40266bb6787a5f245d106b2c0f70ffbb7a","tarball":"https://registry.npmjs.org/hyperdrive-count-import/-/hyperdrive-count-import-1.0.2.tgz","integrity":"sha512-kKCm3EKDWy7qeE3LyvcZGM6u2xYzcZvfysl4BESiNhGZxyDZWUreV4CS5PsPw+RO+7lBq6StQFn8/u22Bn1AnQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCgTTJYFFDtbmlLkJWvQppr5eLeDAHYuV7WKZ2LgFUBUAIhAPz4bUgdw6pHIcqojjbbXH3kzobM2cu8NL2ovwvZcXDh"}]},"maintainers":[{"name":"jhand","email":"joe@hand.email"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/hyperdrive-count-import-1.0.2.tgz_1483989796962_0.1678479197435081"}},"1.1.0":{"name":"hyperdrive-count-import","version":"1.1.0","description":"Count and import a directory to hyperdrive","main":"index.js","scripts":{"test":"standard"},"repository":{"type":"git","url":"git+https://github.com/joehand/hyperdrive-count-import.git"},"author":{"name":"Joe Hand","email":"joe@hand.email","url":"https://joeahand.com/"},"license":"MIT","bugs":{"url":"https://github.com/joehand/hyperdrive-count-import/issues"},"homepage":"https://github.com/joehand/hyperdrive-count-import#readme","dependencies":{"anymatch":"^1.3.0","folder-walker":"^3.0.0","hyperdrive-import-files":"^2.8.0","stream-each":"^1.1.2"},"gitHead":"84679b5cab801dc301f46b89f6e01e31706116a4","_id":"hyperdrive-count-import@1.1.0","_shasum":"fa90e67327ccf51ec6f6f699165bd2c1741acea8","_from":".","_npmVersion":"3.10.8","_nodeVersion":"6.9.1","_npmUser":{"name":"jhand","email":"joe@hand.email"},"dist":{"shasum":"fa90e67327ccf51ec6f6f699165bd2c1741acea8","tarball":"https://registry.npmjs.org/hyperdrive-count-import/-/hyperdrive-count-import-1.1.0.tgz","integrity":"sha512-mRim1O6srTUvrBVJFREgd6afGuueb6YorCO6/WECz7hPk/NU7I7mukUjWhDzicg/bA5JtXSTA84KYD7VpxUgLw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCOGFLIq915wz7tQB5TaI3G7+Xaf2z1P3CeKlNrESTqEgIgW7SeZGswVNuroPnzozksDa004SEkJpKMY21wJ/MqdfU="}]},"maintainers":[{"name":"jhand","email":"joe@hand.email"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/hyperdrive-count-import-1.1.0.tgz_1484586763536_0.521021184977144"}}},"readme":"\n# hyperdrive-count-import\n\nCount number of files and size of directory while importing to hyperdrive using [hyperdrive-import-files](https://github.com/juliangruber/hyperdrive-import-files)\n\nThis can be used to show importing progress of a directory.\n\n## Usage\n\nSee `example.js` for a full example.\n\n```js\nvar countImport = require('hyperdrive-count-import')\n// hyperdrive stuff\n\nvar archive = drive.createArchive()\nvar status = countImport(archive, process.cwd(), function (err) {\n  if (err) throw err\n  console.log('IMPORT FINISHED')\n  process.exit(0)\n})\n\nsetInterval(function () {\n  var progress = Math.round(status.fileCount * 100 / status.countStats.files)\n  console.log(`Import progress: ${progress}%`)\n}, 500)\n\nstatus.on('count finished', function (stats) {\n  console.log('COUNT FINISHED')\n})\n```\n\n## API\n\n### var status = countImport(archive, dir, [opts], [cb])\n\n`status` is the `hyperdrive-import-files` instance, with all the same events available. `opts` and `cb` are passed to the importer.\n\n**Note: Importing starts at the same time as counting. So you'll have `status.on('file added')` events while counting events are going.**\n\nIn addition to the `hyperdrive-import-file` events, there are two counting events:\n\n#### status.on('file counted')\n\nEmitted for each file count.\n\n#### status.on('count finished', countStats)\n\nWhere `countStats` is: \n\n```js\ncountStats = {\n  files: 190, // total files in dir\n  bytes: 102 // total bytes in dir\n}\n```\n\n#### status.countStats\n\nDirectory file and byte counts. Updated while counting happens.\n\n## License\n\nMIT\n","maintainers":[{"name":"jhand","email":"joe@hand.email"}],"time":{"modified":"2022-06-18T23:32:38.277Z","created":"2016-11-04T18:51:44.208Z","1.0.0":"2016-11-04T18:51:44.208Z","1.0.1":"2016-12-23T15:34:36.282Z","1.0.2":"2017-01-09T19:23:17.200Z","1.1.0":"2017-01-16T17:12:45.422Z"},"homepage":"https://github.com/joehand/hyperdrive-count-import#readme","repository":{"type":"git","url":"git+https://github.com/joehand/hyperdrive-count-import.git"},"author":{"name":"Joe Hand","email":"joe@hand.email","url":"https://joeahand.com/"},"bugs":{"url":"https://github.com/joehand/hyperdrive-count-import/issues"},"license":"MIT","readmeFilename":"readme.md"}