{"id":18264886,"url":"https://github.com/bem/es5-shims","last_synced_at":"2025-04-09T01:42:24.006Z","repository":{"id":84305477,"uuid":"16320523","full_name":"bem/es5-shims","owner":"bem","description":"es5 shims moved from bem-core","archived":false,"fork":false,"pushed_at":"2015-11-09T12:43:24.000Z","size":267,"stargazers_count":3,"open_issues_count":0,"forks_count":2,"subscribers_count":18,"default_branch":"master","last_synced_at":"2025-02-14T19:54:07.859Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bem.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2014-01-28T18:04:32.000Z","updated_at":"2024-10-04T01:10:55.000Z","dependencies_parsed_at":"2023-03-08T16:26:18.437Z","dependency_job_id":null,"html_url":"https://github.com/bem/es5-shims","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/bem%2Fes5-shims","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bem%2Fes5-shims/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bem%2Fes5-shims/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bem%2Fes5-shims/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bem","download_url":"https://codeload.github.com/bem/es5-shims/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247958710,"owners_count":21024821,"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":[],"created_at":"2024-11-05T11:16:24.122Z","updated_at":"2025-04-09T01:42:23.986Z","avatar_url":"https://github.com/bem.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"es5-shims\n=========\n\nThis module provides shim for some commonly used ES5 methods.\n\n```js\nArray.prototype.indexOf\nArray.prototype.forEach\nArray.prototype.map\nArray.prototype.filter\nArray.prototype.reduce\nArray.prototype.some\nArray.prototype.every\nArray.isArray\n\nDate.now\n\nObject.keys\n\nJSON.stringify\nJSON.parse\n\nFunction.prototype.bind\n\nString.prototype.trim\n```\n\n## Usage\n\nYou could use `es5-shims` as a standalone JS-library or as a BEM-library.\n\n### As standalone library\n\nAdd JS-file from Yandex CDN:\n\n```html\n\u003cscript src=\"https://yastatic.net/es5-shims/0.0.2/es5-shims.min.js\"\u003e\u003c/script\u003e\n```\n\n### As BEM library\n\nAdd `es5-shims` to your project's `bower.json` config:\n\n```json\n{\n  \"dependencies\": {\n    \"es5-shims\": \"bem/es5-shims~0.0.2\"\n  }\n}\n```\n\nDefine shims that you need as your block's dependencies:\n\n```js\n// prj/common.blocks/link/link.deps.js\n\n({\n    mustDeps : [\n        {\n            block : 'ecma',\n            elem : [\n                'array',\n                'date',\n                'function',\n                'json',\n                'object',\n                'string'\n            ]\n        }\n    ]\n})\n```\n\n*Don't forget to configure your build system, so it could find blocks from `es5-shims/common.blocks`.*\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbem%2Fes5-shims","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbem%2Fes5-shims","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbem%2Fes5-shims/lists"}