{"id":13299601,"url":"https://github.com/azu/what-is-this","last_synced_at":"2025-03-13T22:32:12.603Z","repository":{"id":66143805,"uuid":"112831736","full_name":"azu/what-is-this","owner":"azu","description":"What value is `this` in Strict, Script, or Module?","archived":false,"fork":false,"pushed_at":"2023-05-28T01:27:14.000Z","size":91,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"gh-pages","last_synced_at":"2024-10-05T12:43:39.944Z","etag":null,"topics":["ecmascript","javascript","spec","this"],"latest_commit_sha":null,"homepage":"https://azu.github.io/what-is-this/","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/azu.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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"azu"}},"created_at":"2017-12-02T10:05:19.000Z","updated_at":"2024-01-19T06:56:17.000Z","dependencies_parsed_at":"2024-10-25T12:47:33.672Z","dependency_job_id":"fe18cb3e-02ab-4cbe-8a89-777859443cb2","html_url":"https://github.com/azu/what-is-this","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/azu%2Fwhat-is-this","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/azu%2Fwhat-is-this/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/azu%2Fwhat-is-this/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/azu%2Fwhat-is-this/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/azu","download_url":"https://codeload.github.com/azu/what-is-this/tar.gz/refs/heads/gh-pages","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243494358,"owners_count":20299805,"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":["ecmascript","javascript","spec","this"],"created_at":"2024-07-29T17:37:45.257Z","updated_at":"2025-03-13T22:32:12.594Z","avatar_url":"https://github.com/azu.png","language":"JavaScript","funding_links":["https://github.com/sponsors/azu"],"categories":[],"sub_categories":[],"readme":"# what-is-this\n\nWhat value is `this` in Strict, Script, or Module?\n\n## Comparison Table\n\nOpen following URL:\n\n- Function: \u003chttps://azu.github.io/what-is-this/\u003e\n- Method: \u003chttps://azu.github.io/what-is-this/method.html\u003e\n\n## :bug: Bug\n\n- V8\n    - [791334 - `this` in top level Arrow Function in Module Context should be `undefined` - chromium - Monorail](https://bugs.chromium.org/p/chromium/issues/detail?id=791334 \"791334 - `this` in top level Arrow Function in Module Context should be `undefined` - chromium - Monorail\")\n\n## :memo: Specification\n\n- Set `[[ThisValue]]`\n    - https://tc39.github.io/ecma262/#sec-evaluatecall\n    - https://tc39.github.io/ecma262/#sec-call\n    - https://tc39.github.io/ecma262/#sec-ecmascript-function-objects-call-thisargument-argumentslist\n    - https://tc39.github.io/ecma262/#sec-ordinarycallbindthis\n- Lookup `[[ThisValue]]`\n    - https://tc39.github.io/ecma262/#sec-getthisenvironment \n\n### Script(Global) Environment\n\n- `[[ThisValue]]`: global\n\n### Module Environment\n\n- `[[ThisValue]]`: undefiled\n\n### Function call\n\n- Depended on call context\n\n### Arrow Function call\n\n- Arrow Function don't bind `[[ThisValue]]`\n- Depended on enclosing environment\n- https://tc39.github.io/ecma262/#sec-ordinarycallbindthis\n- https://tc39.github.io/ecma262/#sec-arrow-function-definitions-runtime-semantics-evaluation\n- https://esdiscuss.org/topic/clarification-regarding-top-level-arrow-functions-and-this-arguments\n\n## Changelog\n\nSee [Releases page](https://github.com/azu/what-is-this/releases).\n\n## Running tests\n\nInstall devDependencies and Run `npm test`:\n\n    npm i -d \u0026\u0026 npm test\n\n## Contributing\n\nPull requests and stars are always welcome.\n\nFor bugs and feature requests, [please create an issue](https://github.com/azu/what-is-this/issues).\n\n1. Fork it!\n2. Create your feature branch: `git checkout -b my-new-feature`\n3. Commit your changes: `git commit -am 'Add some feature'`\n4. Push to the branch: `git push origin my-new-feature`\n5. Submit a pull request :D\n\n## Author\n\n- [github/azu](https://github.com/azu)\n- [twitter/azu_re](https://twitter.com/azu_re)\n\n## License\n\nMIT © azu\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fazu%2Fwhat-is-this","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fazu%2Fwhat-is-this","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fazu%2Fwhat-is-this/lists"}