pnpm
Version:
Fast, disk space efficient package manager
145 lines (144 loc) • 10.2 kB
JSON
{
"_args": [
[
{
"raw": "pretty-time@1.1.0",
"scope": null,
"escapedName": "pretty-time",
"name": "pretty-time",
"rawSpec": "1.1.0",
"spec": "1.1.0",
"type": "version"
},
"/home/zoltan/src/pnpm/pnpm/packages/pnpm/node_modules/@pnpm/default-reporter"
]
],
"_from": "pretty-time@1.1.0",
"_id": "pretty-time@1.1.0",
"_inCache": true,
"_location": "/pretty-time",
"_nodeVersion": "10.0.0",
"_npmOperationalInternal": {
"host": "s3://npm-registry-packages",
"tmp": "tmp/pretty-time_1.1.0_1531416027618_0.879139442124429"
},
"_npmUser": {
"name": "jonschlinkert",
"email": "github@sellside.com"
},
"_npmVersion": "6.1.0",
"_phantomChildren": {},
"_requested": {
"raw": "pretty-time@1.1.0",
"scope": null,
"escapedName": "pretty-time",
"name": "pretty-time",
"rawSpec": "1.1.0",
"spec": "1.1.0",
"type": "version"
},
"_requiredBy": [
"/@pnpm/default-reporter"
],
"_resolved": "https://registry.npmjs.org/pretty-time/-/pretty-time-1.1.0.tgz",
"_shasum": "ffb7429afabb8535c346a34e41873adf3d74dd0e",
"_shrinkwrap": null,
"_spec": "pretty-time@1.1.0",
"_where": "/home/zoltan/src/pnpm/pnpm/packages/pnpm/node_modules/@pnpm/default-reporter",
"author": {
"name": "Jon Schlinkert",
"url": "https://github.com/jonschlinkert"
},
"bugs": {
"url": "https://github.com/jonschlinkert/pretty-time/issues"
},
"dependencies": {},
"description": "Easily format the time from node.js `process.hrtime`. Works with timescales ranging from weeks to nanoseconds.",
"devDependencies": {
"gulp-format-md": "^1.0.0",
"mocha": "^3.5.3"
},
"directories": {},
"dist": {
"integrity": "sha512-28iF6xPQrP8Oa6uxE6a1biz+lWeTOAPKggvjB8HAs6nVMKZwf5bG++632Dx614hIWgUPkgivRfG+a8uAXGTIbA==",
"shasum": "ffb7429afabb8535c346a34e41873adf3d74dd0e",
"tarball": "https://registry.npmjs.org/pretty-time/-/pretty-time-1.1.0.tgz",
"fileCount": 5,
"unpackedSize": 10045,
"npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbR43bCRA9TVsSAnZWagAAqMgP/jprBUtBoTe7JGivS8Bd\nbhqWvLPiAN5oFG3FGxAm4hvrZl2z90ixPQOspv2HsSCUytSXb8Wi2TbcDpz0\nTw0G9sS+qZYS3qpPyzDwMTHXzFsFowD4Nck/6g79UljlDZnDfHSK1/1RcvkM\nnvuCHUKtA7vSDZz4r1J5/F9UeToTCBgU1SFF0TBXAEjo9KF+/ve2RzZd6MX0\naOEAg1l0/I1p5BAkDfIP+vsRtUF7Y7IvXnQhG8E5pp0CYPJcSsewE4EmbCLH\n4kb4t2YIjr1sekAhjnYFnNEOZu3ufnmHJIHA92KJJonaeQaAjqc7CWBg/ANt\nrFQGyhcn1UOdpDWTAmT6XM6JloXBGuMuWWyvGxU7iaIIF/uISPcuCzvdWoso\nbF8f3SV9O1+rVn0bLi1Rv2iYw1BklnAc3CcwFqF70qRs37ASMhXJDBNWfA2o\n6bOJ8Fb/G1SnAVWarbvodkyzLXpBu3J6AAnX6q3Ch8T/FqysNDnmfHQsco1/\nXmwh4/2h3r/dEYjiqEnGkzsrTbTfcuLohLEm5m9Gmtiw+ZMPfiq7ImvvuWGx\n3bAt7J7XuNzWC2Ex3A7sqBuSA7S+mnAPHVfgqs3bIlvv1+vowqv1++29gDFJ\nawi0JRUv9d7iw2rCAXLH65ivngqP2z+MpmFjyOgFF1JpugrsR/YrOchKAL6X\nXY+h\r\n=3tCf\r\n-----END PGP SIGNATURE-----\r\n"
},
"engines": {
"node": ">=4"
},
"files": [
"index.js",
"utils.js"
],
"gitHead": "c4b3f79c08adb9a16f6a93152920dd1a63c18f96",
"homepage": "https://github.com/jonschlinkert/pretty-time",
"keywords": [
"convert",
"date",
"format",
"formatting",
"hour",
"hrtime",
"micro",
"milli",
"minute",
"nano",
"nanosecond",
"pretty",
"second",
"time",
"week"
],
"license": "MIT",
"main": "index.js",
"maintainers": [
{
"name": "doowb",
"email": "brian.woodward@gmail.com"
},
{
"name": "jonschlinkert",
"email": "github@sellside.com"
}
],
"name": "pretty-time",
"optionalDependencies": {},
"readme": "# pretty-time [](https://www.npmjs.com/package/pretty-time) [](https://npmjs.org/package/pretty-time) [](https://npmjs.org/package/pretty-time) [](https://travis-ci.org/jonschlinkert/pretty-time)\n\n> Easily format the time from node.js `process.hrtime`. Works with timescales ranging from weeks to nanoseconds.\n\nPlease consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support.\n\n## Install\n\nInstall with [npm](https://www.npmjs.com/):\n\n```sh\n$ npm install --save pretty-time\n```\n\n## Usage\n\n```js\nvar pretty = require('pretty-time');\n\nvar start = process.hrtime();\nvar time = process.hrtime(start);\nconsole.log(pretty(time));\n//=> 3μs\n```\n\n## API\n\nBy default, when no time increment is given as the second argument, the closest timescale is used (e.g. _most granular without being less than zero_).\n\n**Examples:**\n\n```js\npretty([1200708, 795428088]);\n//=> '2w'\n\npretty([800708, 795428088]);\n//=> '1w'\n\npretty([400708, 795428088]);\n//=> '5d'\n\npretty([70708, 795428088]);\n//=> '20h'\n\npretty([12708, 795428088]);\n//=> '4h'\n\npretty([3708, 795428088]);\n//=> '1h'\n\npretty([208, 795428088]);\n//=> '3m'\n\npretty([20, 795428088]);\n//=> '21s'\n\npretty([0, 795428088]);\n//=> '795ms'\n\npretty([0, 000428088]);\n//=> '428μs'\n\npretty([0, 000000088]);\n//=> '88ns'\n\npretty([0, 000000018]);\n//=> '18ns'\n```\n\n### Minimum time increment\n\n_(All of the following examples use `[6740, 795428088]` as the hrtime array.)_\n\nThis value is passed as the second argument and determines how granular to make the time.\n\n**Examples**\n\n```js\npretty(time, 'h');\n//=> '2h'\n\npretty(time, 'm');\n//=> '1h 52m'\n\npretty(time, 's');\n//=> '1h 52m 21s'\n```\n\n**Valid time increments**\n\nAny of the following may be used:\n\n* `ns` | `nano` | `nanosecond` | `nanoseconds`\n* `μs` | `micro` | `microsecond` | `microseconds`\n* `ms` | `milli` | `millisecond` | `milliseconds`\n* `s` | `sec` | `second` | `seconds`\n* `m` | `min` | `minute` | `minutes`\n* `h` | `hr` | `hour` | `hours`\n* `d` | `day` | `days`\n* `w` | `wk` | `week` | `weeks`\n\n## About\n\n<details>\n<summary><strong>Contributing</strong></summary>\n\nPull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).\n\n</details>\n\n<details>\n<summary><strong>Running Tests</strong></summary>\n\nRunning and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command:\n\n```sh\n$ npm install && npm test\n```\n\n</details>\n\n<details>\n<summary><strong>Building docs</strong></summary>\n\n_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_\n\nTo generate the readme, run the following command:\n\n```sh\n$ npm install -g verbose/verb#dev verb-generate-readme && verb\n```\n\n</details>\n\n### Related projects\n\nYou might also be interested in these projects:\n\n* [o-clock](https://www.npmjs.com/package/o-clock): Simple javascript utility for displaying the time in 12-hour clock format. | [homepage](https://github.com/jonschlinkert/o-clock \"Simple javascript utility for displaying the time in 12-hour clock format.\")\n* [seconds](https://www.npmjs.com/package/seconds): Get the number of seconds for a minute, hour, day and week. | [homepage](https://github.com/jonschlinkert/seconds \"Get the number of seconds for a minute, hour, day and week.\")\n* [time-stamp](https://www.npmjs.com/package/time-stamp): Get a formatted timestamp. | [homepage](https://github.com/jonschlinkert/time-stamp \"Get a formatted timestamp.\")\n* [timescale](https://www.npmjs.com/package/timescale): Convert from one time scale to another. Nanosecond is the most atomic unit, week is… [more](https://github.com/jonschlinkert/timescale) | [homepage](https://github.com/jonschlinkert/timescale \"Convert from one time scale to another. Nanosecond is the most atomic unit, week is the largest unit.\")\n* [week](https://www.npmjs.com/package/week): Get the current week number. | [homepage](https://github.com/datetime/week \"Get the current week number.\")\n* [weekday](https://www.npmjs.com/package/weekday): Get the name and number of the current weekday. Or get the name of the… [more](https://github.com/datetime/weekday) | [homepage](https://github.com/datetime/weekday \"Get the name and number of the current weekday. Or get the name of the weekday for a given number.\")\n* [year](https://www.npmjs.com/package/year): Simple utility to get the current year with 2 or 4 digits. | [homepage](https://github.com/jonschlinkert/year \"Simple utility to get the current year with 2 or 4 digits.\")\n\n### Contributors\n\n| **Commits** | **Contributor** | \n| --- | --- |\n| 14 | [jonschlinkert](https://github.com/jonschlinkert) |\n| 5 | [doowb](https://github.com/doowb) |\n\n### Author\n\n**Jon Schlinkert**\n\n* [LinkedIn Profile](https://linkedin.com/in/jonschlinkert)\n* [GitHub Profile](https://github.com/jonschlinkert)\n* [Twitter Profile](https://twitter.com/jonschlinkert)\n\n### License\n\nCopyright © 2018, [Jon Schlinkert](https://github.com/jonschlinkert).\nReleased under the [MIT License](LICENSE).\n\n***\n\n_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on July 12, 2018._",
"readmeFilename": "README.md",
"repository": {
"type": "git",
"url": "git+https://github.com/jonschlinkert/pretty-time.git"
},
"scripts": {
"test": "mocha"
},
"verb": {
"toc": false,
"layout": "default",
"tasks": [
"readme"
],
"plugins": [
"gulp-format-md"
],
"related": {
"list": [
"o-clock",
"seconds",
"time-stamp",
"timescale",
"week",
"weekday",
"year"
]
},
"lint": {
"reflinks": true
}
},
"version": "1.1.0"
}