{"id":19660954,"url":"https://github.com/o2team/es5-polyfill","last_synced_at":"2025-04-28T20:32:31.331Z","repository":{"id":177683895,"uuid":"90547512","full_name":"o2team/es5-polyfill","owner":"o2team","description":"ECMAScript 5 Polyfill for IE-8","archived":false,"fork":false,"pushed_at":"2019-10-29T08:08:27.000Z","size":53,"stargazers_count":31,"open_issues_count":2,"forks_count":14,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-04-26T10:56:34.418Z","etag":null,"topics":["polyfill"],"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/o2team.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}},"created_at":"2017-05-07T16:50:47.000Z","updated_at":"2024-09-01T10:34:00.000Z","dependencies_parsed_at":"2023-07-09T06:45:54.220Z","dependency_job_id":null,"html_url":"https://github.com/o2team/es5-polyfill","commit_stats":null,"previous_names":["o2team/es5-polyfill"],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/o2team%2Fes5-polyfill","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/o2team%2Fes5-polyfill/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/o2team%2Fes5-polyfill/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/o2team%2Fes5-polyfill/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/o2team","download_url":"https://codeload.github.com/o2team/es5-polyfill/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251383985,"owners_count":21580980,"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":["polyfill"],"created_at":"2024-11-11T16:06:02.183Z","updated_at":"2025-04-28T20:32:31.049Z","avatar_url":"https://github.com/o2team.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ECMAScript 5 Polyfills\n\n## Object\n\n[Object.keys](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/keys)\n\n[Object.getPrototypeOf](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/getPrototypeOf)\n\n[Object.getOwnPropertyNames](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/getOwnPropertyNames)\n\n[Object.defineProperty](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/defineProperty) 注意不要给普通对象添加属性时用 `get/set`，慎用\n\n[Object.defineProperties](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/defineProperties) 慎用\n\n[Object.create](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/create)\n\n## Array\n\n[Array.isArray](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/isArray)\n\n[Array.prototype.forEach](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/forEach)\n\n[Array.prototype.every](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every)\n\n[Array.prototype.fill](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/fill)\n\n[Array.prototype.filter](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter)\n\n[Array.prototype.find](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find)\n\n[Array.prototype.findIndex](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex)\n\n[Array.prototype.indexOf](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/indexOf)\n\n[Array.prototype.lastIndexOf](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/lastIndexOf)\n\n[Array.prototype.map](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map)\n\n[Array.prototype.reduce](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce)\n\n[Array.prototype.reduceRight](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduceRight)\n\n[Array.prototype.some](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some)\n\n## Function\n\n[Function.prototype.bind](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/bind)\n\n## String\n\n[String.prototype.trim](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/trim)\n\n## Date\n\n[Date.prototype.now](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/now)\n\n[Date.prototype.toISOString](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString)\n\n## DOM相关\n\n[Document.getElementsByClassName](https://developer.mozilla.org/en-US/docs/Web/API/Document/getElementsByClassName)\n\n[CustomEvent](https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent)\n\n[Element.matches](https://developer.mozilla.org/en/docs/Web/API/Element/matches)\n\n[Element.textContent](https://developer.mozilla.org/en-US/docs/Web/API/Node/textContent)\n\n## Element.getBoundingClientRect\n\n弥补了IE中`getBoundingClientRect`取不到width/height的缺憾\n\n## 事件绑定/解绑\n\nIE中也使用`addEventListener`/`removeEventListener`方法进行事件绑定/解绑\n\n## window\n\n### getComputedStyle\n\n为IE增加了此API的Polyfill\n\n### Viewport\n\n获取当前窗口的一些属性已经做了兼容，可以直接使用如下属性来获取\n\nwindow.innerWidth\n\nwindow.innerHeight\n\nwindow.pageXOffset\n\nwindow.pageYOffset\n\nwindow.scrollX\n\nwindow.scrollY\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fo2team%2Fes5-polyfill","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fo2team%2Fes5-polyfill","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fo2team%2Fes5-polyfill/lists"}