UNPKG

@zkochan/pnpm

Version:

Fast, disk space efficient package manager

116 lines (115 loc) 5.77 kB
{ "_args": [ [ { "raw": "pretty-bytes@5.1.0", "scope": null, "escapedName": "pretty-bytes", "name": "pretty-bytes", "rawSpec": "5.1.0", "spec": "5.1.0", "type": "version" }, "/home/zkochan/src/pnpm/packages/pnpm/node_modules/pnpm-default-reporter" ] ], "_from": "pretty-bytes@5.1.0", "_id": "pretty-bytes@5.1.0", "_inCache": true, "_location": "/pretty-bytes", "_nodeVersion": "8.11.2", "_npmOperationalInternal": { "host": "s3://npm-registry-packages", "tmp": "tmp/pretty-bytes_5.1.0_1528384467879_0.10335868470826903" }, "_npmUser": { "name": "sindresorhus", "email": "sindresorhus@gmail.com" }, "_npmVersion": "6.1.0", "_phantomChildren": {}, "_requested": { "raw": "pretty-bytes@5.1.0", "scope": null, "escapedName": "pretty-bytes", "name": "pretty-bytes", "rawSpec": "5.1.0", "spec": "5.1.0", "type": "version" }, "_requiredBy": [ "/pnpm-default-reporter" ], "_resolved": "https://registry.npmjs.org/pretty-bytes/-/pretty-bytes-5.1.0.tgz", "_shasum": "6237ecfbdc6525beaef4de722cc60a58ae0e6c6d", "_shrinkwrap": null, "_spec": "pretty-bytes@5.1.0", "_where": "/home/zkochan/src/pnpm/packages/pnpm/node_modules/pnpm-default-reporter", "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, "bugs": { "url": "https://github.com/sindresorhus/pretty-bytes/issues" }, "dependencies": {}, "description": "Convert bytes to a human readable string: 1337 → 1.34 kB", "devDependencies": { "ava": "*", "full-icu": "^1.2.1", "xo": "*" }, "directories": {}, "dist": { "integrity": "sha512-wa5+qGVg9Yt7PB6rYm3kXlKzgzgivYTLRandezh43jjRqgyDyP+9YxfJpJiLs9yKD1WeU8/OvtToWpW7255FtA==", "shasum": "6237ecfbdc6525beaef4de722cc60a58ae0e6c6d", "tarball": "https://registry.npmjs.org/pretty-bytes/-/pretty-bytes-5.1.0.tgz", "fileCount": 4, "unpackedSize": 5134, "npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbGUvVCRA9TVsSAnZWagAA+DkP/0jB34vqP9ZYcsH3dji4\nbBgB8LBdXaXElCAD0N6F7iVY3rgls14dWgTNqILL9hB1ZKmp2XNgKIi5NkCI\nAY2rMy8O/mHC5oGjbAQa//RYQYHiQU+yLqQjJYDtD9GAMwD2e4td7Mjbja2z\ngjm7q/8tmRpdndxkKzot0eqYKrH7N5rB/T386+zI+neMRDdfgUA6W1nR/sAx\nRKvLFirxJgc3MHXyr7bifWDEN/AWuIlsFYPmLz9PvMiEXpZZtZ2AeklyxTLu\nbItPWN0C5HrfdgIFAMn9U2J0JxJ3Y9ReUC4djVUgQOKtANwbycmrhyV2bKKK\n2gpVQEgtwBMBKHOPuq9H+8NYbB9memdycZDlWoa18nk7tzxBeqD6083cRbp5\nwNIKnWESLbmoOlwNEM3t0uNH5Ft2PbpYREjm5xxMUoN450PRpJfo2Pj4MzQr\nBfA0Bw2TA1Lq4KMjNEcPt+fNJYWsgCu7MqvRJZvuGlweZw3t9zHaCkDwBbnV\nS2QOf/4kS2KKy8inwu2IlFynLyxjDNqC/kzP1eM1F+LtPhMQenq+KOR0Luea\nqr/w0EeAOTc6sSkRE2d5xvjv8fBXCsdnwdU6M0rtTGZoTgMuNFehs+jP2a5H\na+XpTPcr+/4cqunYintxVWTyBkyRx54o9lR1NuvFbFrxyko9R39qnTFcuuVA\nICAa\r\n=fTeW\r\n-----END PGP SIGNATURE-----\r\n" }, "engines": { "node": ">=6" }, "files": [ "index.js" ], "gitHead": "9db9f7d0f8d8105329055bd02f33fcf9581e7aff", "homepage": "https://github.com/sindresorhus/pretty-bytes#readme", "keywords": [ "pretty", "bytes", "byte", "filesize", "size", "file", "human", "humanized", "readable", "si", "data", "locale", "localization", "localized" ], "license": "MIT", "maintainers": [ { "name": "sindresorhus", "email": "sindresorhus@gmail.com" } ], "name": "pretty-bytes", "optionalDependencies": {}, "readme": "# pretty-bytes [![Build Status](https://travis-ci.org/sindresorhus/pretty-bytes.svg?branch=master)](https://travis-ci.org/sindresorhus/pretty-bytes)\n\n> Convert bytes to a human readable string: `1337` → `1.34 kB`\n\nUseful for displaying file sizes for humans.\n\n*Note that it uses base-10 (e.g. kilobyte).\n[Read about the difference between kilobyte and kibibyte.](https://web.archive.org/web/20150324153922/https://pacoup.com/2009/05/26/kb-kb-kib-whats-up-with-that/)*\n\n\n## Install\n\n```\n$ npm install pretty-bytes\n```\n\n\n## Usage\n\n```js\nconst prettyBytes = require('pretty-bytes');\n\nprettyBytes(1337);\n//=> '1.34 kB'\n\nprettyBytes(100);\n//=> '100 B'\n\n// Display file size differences\nprettyBytes(42, {signed: true});\n//=> '+42 B'\n\n// Localized output using German locale\nprettyBytes(1337, {locale: 'de'});\n//=> '1,34 kB'\n```\n\n\n## API\n\n### prettyBytes(input, [options])\n\n#### input\n\nType: `number`\n\nThe number to format.\n\n#### options\n\nType: `Object`\n\n##### signed\n\nType: `boolean`<br>\nDefault: `false`\n\nInclude plus sign for positive numbers. If the difference is exactly zero a space character will be prepended instead for better alignment.\n\n\n##### locale\n\nType: `boolean` `string`<br>\nDefault: `false` *(No localization)*\n\n- If `true`: Localize the output using the system/browser locale.\n- If `string`: Expects a [BCP 47 language tag](https://en.wikipedia.org/wiki/IETF_language_tag) (For example: `en`, `de`, …)\n\n**Note:** Localization should generally work in browsers. Node.js needs to be [built](https://github.com/nodejs/node/wiki/Intl) with `full-icu` or `system-icu`. Alternatively, the [`full-icu`](https://github.com/unicode-org/full-icu-npm) module can be used to provide support at runtime.\n\n\n## Related\n\n- [pretty-bytes-cli](https://github.com/sindresorhus/pretty-bytes-cli) - CLI for this module\n\n\n## License\n\nMIT © [Sindre Sorhus](https://sindresorhus.com)\n", "readmeFilename": "readme.md", "repository": { "type": "git", "url": "git+https://github.com/sindresorhus/pretty-bytes.git" }, "scripts": { "test": "xo && NODE_ICU_DATA=node_modules/full-icu ava" }, "version": "5.1.0" }