{"id":15489677,"url":"https://github.com/pablopunk/healthi-js","last_synced_at":"2025-04-22T18:28:02.101Z","repository":{"id":57262193,"uuid":"78376968","full_name":"pablopunk/healthi-js","owner":"pablopunk","description":"Simple npm module to get your PC's battery health","archived":false,"fork":false,"pushed_at":"2019-01-17T07:44:50.000Z","size":243,"stargazers_count":5,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-05-02T05:12:16.468Z","etag":null,"topics":["battery","health","javascript","mac","macbook-battery-health","module","node","npm"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/healthi","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pablopunk.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-01-08T23:17:45.000Z","updated_at":"2024-02-24T07:27:35.000Z","dependencies_parsed_at":"2022-08-26T17:01:05.410Z","dependency_job_id":null,"html_url":"https://github.com/pablopunk/healthi-js","commit_stats":null,"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pablopunk%2Fhealthi-js","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pablopunk%2Fhealthi-js/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pablopunk%2Fhealthi-js/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pablopunk%2Fhealthi-js/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pablopunk","download_url":"https://codeload.github.com/pablopunk/healthi-js/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250296588,"owners_count":21407044,"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":["battery","health","javascript","mac","macbook-battery-health","module","node","npm"],"created_at":"2024-10-02T07:06:54.260Z","updated_at":"2025-04-22T18:28:02.076Z","avatar_url":"https://github.com/pablopunk.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# healthi\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://www.npmjs.com/package/healthi\"\u003e\u003cimg src=\"https://img.shields.io/npm/dt/healthi.svg\" alt=\"Downloads\" /\u003e\u003c/a\u003e\n  \u003ca href=\"https://github.com/feross/standard\"\u003e\u003cimg src=\"https://img.shields.io/badge/code_style-standard-brightgreen.svg\" alt=\"Code Style\" /\u003e\u003c/a\u003e\n  \u003ca href=\"https://travis-ci.org/pablopunk/healthi-js\"\u003e\u003cimg src=\"https://travis-ci.org/pablopunk/healthi-js.svg?branch=master\" alt=\"Build Status\" /\u003e\u003c/a\u003e\n  \u003cp align=\"center\"\u003eSimple module to get your PC's battery health\u003c/p\u003e\n\u003c/p\u003e\n\n## Install\n\nRight now it supports **mac** and **linux**:\n\n```sh\nnpm install healthi\n```\n\n## Usage\n\n_Healthi_ works with promises since [version 2.0.0](https://github.com/pablopunk/healthi-js/releases/tag/2.0.0):\n\n#### Example 1: await\n\n```javascript\nconst health = require('healthi')\nconst battery = await health()\nconsole.log(battery.health) //=\u003e 90.76078670529044\n```\n\n#### Example 2: then\n\n```javascript\nconst health = require('healthi')\nhealth()\n.then(console.log) //=\u003e { currentCapacity: 5953,  originalCapacity: 6559,  health: 90.76078670529044 }\n.catch(console.log)\n```\n\n## Result\n\nThe `battery` object has 3 attributes:\n\n```js\n{\n  now,      // Example: 5953 mAh\n  original, // Example: 6559 mAh\n  health    // Example: 90.7 % (this is the current capacity compared to the original one)\n}\n```\n\n## Contribute\n\n[![JavaScript Style Guide](https://cdn.rawgit.com/feross/standard/master/badge.svg)](https://github.com/feross/standard)\n\nFeel free to open an issue or a pull request\n\n## Author\n\n| ![me](https://www.gravatar.com/avatar/fa50aeff0ddd6e63273a068b04353d9d?s=100) |\n| ----------------------------------------------------------------------------- |\n| © 2017 [Pablo Varela](https://twitter.com/pablopunk)                          |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpablopunk%2Fhealthi-js","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpablopunk%2Fhealthi-js","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpablopunk%2Fhealthi-js/lists"}