{"_id":"@citation-js/hughsk-file-tree","name":"@citation-js/hughsk-file-tree","dist-tags":{"latest":"2.0.0"},"versions":{"2.0.0":{"name":"@citation-js/hughsk-file-tree","version":"2.0.0","description":"Fork of hughsk/file-tree: Generate a tree of file metadata that matches d3's hierarchy layout format","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git://github.com/hughsk/file-tree.git"},"keywords":["hierarchy","children","tree","file","metadata","d3"],"author":{"name":"Lars Willighagen","url":"https://larsgw.github.io/"},"contributors":[{"name":"Hugh Kennedy","email":"hughskennedy@gmail.com","url":"http://hughskennedy.com/"}],"license":"MIT","dependencies":{"async-reduce":"0.0.1","commondir":"^1.0.1","flat":"^5.0.2"},"gitHead":"b3ed3d0f5c3d5a21c2701ba52deecc65648c0385","bugs":{"url":"https://github.com/hughsk/file-tree/issues"},"homepage":"https://github.com/hughsk/file-tree#readme","_id":"@citation-js/hughsk-file-tree@2.0.0","_nodeVersion":"12.19.0","_npmVersion":"8.6.0","dist":{"integrity":"sha512-0gareutT+vAYPk9fxr11u1RvthKzEdPLvSsgvcLxbi+DmwOMJbJknI0w4wfuQ86VVlfuYjUMoOWHnlIFzUiXhw==","shasum":"97185c1a22221cd2b3a0390f18b88658928ce383","tarball":"https://registry.npmjs.org/@citation-js/hughsk-file-tree/-/hughsk-file-tree-2.0.0.tgz","fileCount":4,"unpackedSize":4244,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIH1Spyu++amR6W0zmXiWjzYyFKvqsEly+IkEPYpj8pzKAiEAw5l9xpc5x3jdZgyrQD/oNI0PHNOLtl99NMpU4rIRKcA="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiXGJ9ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpRCQ//YS2DWbdwLFLwXDv/eW6CG0bDzLnB1XsLqQlpGb1ZfOvG5TGu\r\nfJAn5vD3WuEZzhnYX56EIWcUqNKmaSbiSSz214bQqvFllvq+TA/3dDlmwTCK\r\n9/KuSfGhe0BybDi9cRO2oPO1F8jjjlNqRnAdOw7e0dmjFNlndVj1Ak5h2gvi\r\neTKIDVwCEJreBuZ7OXqRNca8Gxtr3GUwUku3PS8U8dj21XwnEyzhFwdVbq/A\r\nnGQfzgGodUPZRreJQXRBsWs+Xhl/IRpXfe4ceY0wTVP26MG0jQ+8YtgiBIXJ\r\ns91iA8JWNlHiRo5t3DzI8GxYReX1FjIIk/pN0FttxL3LoqA50Zcw3bsvd1O8\r\nGxyDtD74hw65lCcJsI4M/PW9TsQh0l5kHYVm/gJOGHxMtXvLn4i/mnJxyVOO\r\nb7nv2lJLEHouEmcqtKCj8xqOkk0yda01RLUYb8+ckWjymYBb9Snz7gBaHwtd\r\nMXxk5pTcH7hHRFtewd9jZuomc26/pjM8moYQc1I9G6aXrh4rI+0A3ugIdO8N\r\noV0+vmPo8AafkOf1PkaHf7B2YmS4rgnuTP1mEFX+v+1OrmnkxvejUx5kdHFQ\r\n32n3pxxTX/WeAvAgB8MD3C1Vvu0gE6gbbSMdbB406kK9d7xeDrnkvAB67llq\r\nsxwDWfeMKJ17XGlNvS/g+Mk94g2Wfw5hLN8=\r\n=RGqH\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"larsgw","email":"lars.willighagen@gmail.com"},"directories":{},"maintainers":[{"name":"larsgw","email":"lars.willighagen@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hughsk-file-tree_2.0.0_1650221693151_0.7713833381110728"},"_hasShrinkwrap":false}},"time":{"created":"2022-04-17T18:54:53.087Z","2.0.0":"2022-04-17T18:54:53.338Z","modified":"2022-04-17T18:54:53.483Z"},"maintainers":[{"name":"larsgw","email":"lars.willighagen@gmail.com"}],"description":"Fork of hughsk/file-tree: Generate a tree of file metadata that matches d3's hierarchy layout format","homepage":"https://github.com/hughsk/file-tree#readme","keywords":["hierarchy","children","tree","file","metadata","d3"],"repository":{"type":"git","url":"git://github.com/hughsk/file-tree.git"},"contributors":[{"name":"Hugh Kennedy","email":"hughskennedy@gmail.com","url":"http://hughskennedy.com/"}],"author":{"name":"Lars Willighagen","url":"https://larsgw.github.io/"},"bugs":{"url":"https://github.com/hughsk/file-tree/issues"},"license":"MIT","readme":"> Fork of https://github.com/hughsk/file-tree\n\n# file-tree #\n\nA more flexible, asynchronous version of\n[file-size-tree](http://github.com/hughsk/file-size-tree).\n\n## Installation ##\n\n``` bash\nnpm install file-tree\n```\n\n## Usage ##\n\n### `require('file-tree')(files, mapper, callback)` ###\n\nTakes an array of `files`.\n\n`mapper(filename, next)` should pass an object to the the callback\nwith the metadata you want to associate with the file.\n\n`callback(err, tree)` is called when everything's done.\n\n``` javascript\nvar tree = require('file-tree')\nvar fs = require('fs')\n\ntree([\n    __dirname + '/project/src/index.js'\n  , __dirname + '/project/src/README.md'\n  , __dirname + '/project/src/package.json'\n  , __dirname + '/LICENSE'\n], function(filename, next) {\n  fs.stat(filename, function(err, stats) {\n    if (err) return next(err)\n    next(null, {\n      size: stats.size\n    })\n  })\n}, function(err, fileTree) {\n  console.log(fileTree) // done!\n})\n```\n","readmeFilename":"README.md"}