{"id":15685703,"url":"https://github.com/jonschlinkert/nanoseconds","last_synced_at":"2025-05-07T17:29:34.343Z","repository":{"id":57308010,"uuid":"44472727","full_name":"jonschlinkert/nanoseconds","owner":"jonschlinkert","description":"Convert the process.hrtime() array to a single nanoseconds value. (node.js/javascript)","archived":false,"fork":false,"pushed_at":"2018-03-19T22:26:41.000Z","size":9,"stargazers_count":9,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-05-01T19:40:29.160Z","etag":null,"topics":["date","format","hrtime","javascript","jonschlinkert","nanoseconds","node","nodejs","process","time","timescale"],"latest_commit_sha":null,"homepage":"https://github.com/jonschlinkert","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jonschlinkert.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-10-18T09:43:51.000Z","updated_at":"2021-04-12T22:26:47.000Z","dependencies_parsed_at":"2022-09-12T11:20:25.210Z","dependency_job_id":null,"html_url":"https://github.com/jonschlinkert/nanoseconds","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonschlinkert%2Fnanoseconds","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonschlinkert%2Fnanoseconds/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonschlinkert%2Fnanoseconds/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonschlinkert%2Fnanoseconds/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jonschlinkert","download_url":"https://codeload.github.com/jonschlinkert/nanoseconds/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252926211,"owners_count":21826266,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["date","format","hrtime","javascript","jonschlinkert","nanoseconds","node","nodejs","process","time","timescale"],"created_at":"2024-10-03T17:29:14.343Z","updated_at":"2025-05-07T17:29:34.300Z","avatar_url":"https://github.com/jonschlinkert.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# nanoseconds [![NPM version](https://img.shields.io/npm/v/nanoseconds.svg?style=flat)](https://www.npmjs.com/package/nanoseconds) [![NPM monthly downloads](https://img.shields.io/npm/dm/nanoseconds.svg?style=flat)](https://npmjs.org/package/nanoseconds) [![NPM total downloads](https://img.shields.io/npm/dt/nanoseconds.svg?style=flat)](https://npmjs.org/package/nanoseconds) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/nanoseconds.svg?style=flat\u0026label=Travis)](https://travis-ci.org/jonschlinkert/nanoseconds)\n\n\u003e Convert the process.hrtime() array to a single nanoseconds value. This makes it easier to diff times.\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 nanoseconds\n```\n\n## Usage\n\n```js\nconst nano = require('nanoseconds');\nconsole.log(nano(process.hrtime()));\n//=\u003e 725220674029406\n```\n\n**Examples**\n\n```js\nnano([0, 999]);\n//=\u003e 999\n\nnano([12, 999]);\n//=\u003e 12000000999\n\nnano(['1298001', '09187662']);\n//=\u003e 1298001009187662\n```\n\n## About\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eContributing\u003c/strong\u003e\u003c/summary\u003e\n\nPull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eRunning Tests\u003c/strong\u003e\u003c/summary\u003e\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 \u0026\u0026 npm test\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eBuilding docs\u003c/strong\u003e\u003c/summary\u003e\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 \u0026\u0026 verb\n```\n\n\u003c/details\u003e\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* [pretty-time](https://www.npmjs.com/package/pretty-time): Easily format the time from node.js `process.hrtime`. Works with timescales ranging from weeks to nanoseconds. | [homepage](https://github.com/jonschlinkert/pretty-time \"Easily format the time from node.js `process.hrtime`. Works with timescales ranging from weeks to nanoseconds.\")\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\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 March 19, 2018._","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonschlinkert%2Fnanoseconds","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjonschlinkert%2Fnanoseconds","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonschlinkert%2Fnanoseconds/lists"}