UNPKG

motion

Version:

motion - moving development forward

64 lines (63 loc) 3.75 kB
{ "_args": [ [ "du@https://registry.npmjs.org/du/-/du-0.1.0.tgz", "/Users/nw/flint/packages/flint" ] ], "_from": "du@0.1.0", "_id": "du@0.1.0", "_inCache": true, "_location": "/du", "_phantomChildren": {}, "_requested": { "name": "du", "raw": "du@https://registry.npmjs.org/du/-/du-0.1.0.tgz", "rawSpec": "https://registry.npmjs.org/du/-/du-0.1.0.tgz", "scope": null, "spec": "https://registry.npmjs.org/du/-/du-0.1.0.tgz", "type": "remote" }, "_requiredBy": [ "/surge" ], "_resolved": "https://registry.npmjs.org/du/-/du-0.1.0.tgz", "_shasum": "f26e340a09c7bc5b6fd69af6dbadea60fa8c6f4d", "_shrinkwrap": null, "_spec": "du@https://registry.npmjs.org/du/-/du-0.1.0.tgz", "_where": "/Users/nw/flint/packages/flint", "authors": [ "Rod Vagg @rvagg <rod@vagg.org> (https://github.com/rvagg)" ], "bin": { "dujs": "./du.js" }, "bugs": { "url": "https://github.com/rvagg/node-du/issues" }, "dependencies": { "async": "~0.1.22" }, "description": "A simple JavaScript implementation of `du -sb`", "devDependencies": { "mkfiletree": "*" }, "homepage": "https://github.com/rvagg/node-du#readme", "keywords": [ "du", "size" ], "main": "index.js", "name": "du", "optionalDependencies": {}, "readme": "# node-du\nA simple JavaScript / Node.js implementation of `du -sb`. Available in npm as *du*\n\n```js\nrequire('du')('/home/rvagg/.npm/', function (err, size) {\n console.log('The size of /home/rvagg/.npm/ is:', size, 'bytes')\n})\n```\n\nAlso comes with a `dujs` command if installed with `npm install du -g`, just in case `du -sb` was too many 2 too many characters for you to type.\n\n## options\n\nAn optional `options` object may be passed as the second argument. Currently there is only two options,\na `'filter'` function that is passed a full file path and is expected to return a truthy/falsy value to indicate whether the file is included in size calculations\nand a `disk` option. If disk is true, then block sizing is used when calculating the size. (get's you closer to real du numbers).\n\n```js\ndu(\n '/tmp/foo.leveldb/'\n , { filter: function (f) { return /\\.sst$/.test(f) } }\n , function (err, size) {\n console.log('The size of the sst files in /tmp/foo.leveldb/ is:', size, 'bytes')\n }\n)\n```\n\n*Copyright (c) 2012 [Rod Vagg](https://github.com/rvagg) ([@rvagg](https://twitter.com/rvagg))*\n\nMade available under the MIT licence:\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is furnished\nto do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n", "readmeFilename": "README.md", "repository": { "type": "git", "url": "git+https://github.com/rvagg/node-du.git" }, "scripts": { "test": "node tests.js" }, "version": "0.1.0" }