{"id":18452689,"url":"https://github.com/gmartigny/opti-status","last_synced_at":"2026-01-28T06:41:52.127Z","repository":{"id":57315773,"uuid":"184761346","full_name":"GMartigny/opti-status","owner":"GMartigny","description":"🌡️ Get the optimization status of a function from the point of view of V8 engine.","archived":false,"fork":false,"pushed_at":"2020-08-17T09:34:16.000Z","size":97,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-25T08:46:47.926Z","etag":null,"topics":["v8-engine"],"latest_commit_sha":null,"homepage":"","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/GMartigny.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":".github/funding.yml","license":"license","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":"gmartigny","tidelift":"npm/opti-status"}},"created_at":"2019-05-03T13:37:21.000Z","updated_at":"2024-10-28T20:53:26.000Z","dependencies_parsed_at":"2022-08-25T19:36:06.007Z","dependency_job_id":null,"html_url":"https://github.com/GMartigny/opti-status","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/GMartigny%2Fopti-status","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GMartigny%2Fopti-status/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GMartigny%2Fopti-status/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GMartigny%2Fopti-status/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GMartigny","download_url":"https://codeload.github.com/GMartigny/opti-status/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239139705,"owners_count":19588246,"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":["v8-engine"],"created_at":"2024-11-06T07:32:29.719Z","updated_at":"2025-10-31T07:31:17.114Z","avatar_url":"https://github.com/GMartigny.png","language":"JavaScript","funding_links":["https://github.com/sponsors/gmartigny","https://tidelift.com/funding/github/npm/opti-status"],"categories":[],"sub_categories":[],"readme":"# opti-status\n\n[![NPM version](https://flat.badgen.net/npm/v/opti-status)](https://www.npmjs.com/package/opti-status)\n\nGet the optimization status of a function from the point of view of V8 engine.\n\n## Installation\n\n    $ npm install opti-status\n\n\n## Usage\n\n```js\nconst optiStatus = require(\"opti-status\");\n\nconst myFunc = () =\u003e {\n    // ...\n};\n\nconsole.log(optiStatus(myFunc).message);\n```\n\n## API\n\n### `optiStatus(func, [...args])`\n\nThe main function accept a function or a string as first argument and as many additional arguments as you want.\nThe passed function will be called with the additional arguments as parameters.\nReturn an object containing the original status code, the passed function and a human readable message explaining the status.\n\nexample:\n```js\n{\n    status: 49,\n    function: [Function],\n    message: \"This is a function, optimized and turbo-fanned.\",\n}\n```\n\n### `optiStatus.statuses`\n\nThe set of possible statuses according to V8. You need to use a bitwise comparison of the status code to know if each flag is active or not.\n\nexample:\n\n```js\nif (optiStatus(func).status \u0026 optiStatus.statuses.isOptimized) {\n    console.log(\"Great work!\");\n}\n```\n\n\n## License\n\n[MIT](license)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgmartigny%2Fopti-status","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgmartigny%2Fopti-status","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgmartigny%2Fopti-status/lists"}