{"id":47929939,"url":"https://github.com/cnumr/ecoindex_js","last_synced_at":"2026-04-04T07:14:58.326Z","repository":{"id":65151255,"uuid":"578092256","full_name":"cnumr/ecoindex_js","owner":"cnumr","description":"EcoIndex computor","archived":false,"fork":false,"pushed_at":"2025-08-25T09:36:48.000Z","size":208,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"1.x","last_synced_at":"2025-09-10T04:39:01.253Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cnumr.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,"governance":null}},"created_at":"2022-12-14T08:36:47.000Z","updated_at":"2025-08-25T09:36:47.000Z","dependencies_parsed_at":"2023-12-10T16:26:24.482Z","dependency_job_id":"462a09d2-e70e-4313-bf23-a6609ba75cfe","html_url":"https://github.com/cnumr/ecoindex_js","commit_stats":null,"previous_names":["cnumr/ecoindex_js","tsecher/ecoindex_js"],"tags_count":13,"template":false,"template_full_name":null,"purl":"pkg:github/cnumr/ecoindex_js","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cnumr%2Fecoindex_js","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cnumr%2Fecoindex_js/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cnumr%2Fecoindex_js/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cnumr%2Fecoindex_js/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cnumr","download_url":"https://codeload.github.com/cnumr/ecoindex_js/tar.gz/refs/heads/1.x","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cnumr%2Fecoindex_js/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31391079,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-04T04:26:24.776Z","status":"ssl_error","status_checked_at":"2026-04-04T04:23:34.147Z","response_time":60,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":[],"created_at":"2026-04-04T07:14:56.912Z","updated_at":"2026-04-04T07:14:58.314Z","avatar_url":"https://github.com/cnumr.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# EcoIndex - JS\n\nThis project provides methods for the EcoIndex calculation.\n\nIt is based on the work of the association [GreenIT](https://www.greenit.fr/)\nand the web extension [GreenIT-Analysis](https://github.com/cnumr/GreenIT-Analysis/).\n\nThe sources are based on the initial Web Extension ([https://github.com/cnumr/GreenIT-Analysis/blob/master/script/ecoIndex.js](https://github.com/cnumr/GreenIT-Analysis/blob/master/script/ecoIndex.js)) code.\nThe calculation method is discribed on here : ([EcoIndex pouplation](https://www.ecoindex.fr/comment-ca-marche/))\n\n# Install\nInstall package with npm  \n`npm install ecoindex`\n\n# How to use ?\n\n## computeEcoIndex(dom, req, size)\n`computeEcoIndex` returns the ecoIndex according to 3 parameters.\n\n### Parameters\n| Name | Type | Description  |\n| --- | --- |--------------|\n| dom | number | Number of DOM elements | \n| req | number | Number of requests | \n| size | number | Size of response (Ko) | \n\n### Example\n```javascript\nimport {computeEcoIndex} from \"ecoindex\";\n\nconst ecoIndex = computeEcoIndex(dom, req, size);\n```\n\n\n## getEcoIndexGrade(ecoIndex)\n`getEcoIndexGrade` returns the grade according to the ecoIndex value.\n\n### Parameters\n| Name    | Type | Description        |\n|---------| --- |--------------------|\n| ecoIndex | number | The EcoIndex value | \n\n### Example\n```javascript\nimport {computeEcoIndex, getEcoIndexGrade} from \"ecoindex\";\n\nconst ecoIndex = computeEcoIndex(dom, req, size);\nconst grade = getEcoIndexGrade(ecoIndex);\n```\n\n## Testing\nWe use mocha for testing.\nYou can launch tests using this command : \n```\nnpm test\n```\n\n## [License](LICENSE)\n\n## Disclaimer\nThe LCA values used by ecoindex to evaluate environmental impacts are not under free license - ©Frédéric Bordage  \nPlease also refer to the mentions provided in the code files for specifics on the IP regime.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcnumr%2Fecoindex_js","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcnumr%2Fecoindex_js","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcnumr%2Fecoindex_js/lists"}