{"id":20513846,"url":"https://github.com/webreflection/classtrophobic-es5","last_synced_at":"2025-10-31T16:02:29.152Z","repository":{"id":57199599,"uuid":"79052481","full_name":"WebReflection/classtrophobic-es5","owner":"WebReflection","description":"Classtrophobic landed on older browsers too","archived":false,"fork":false,"pushed_at":"2017-01-19T19:03:05.000Z","size":58,"stargazers_count":10,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-11T13:25:05.934Z","etag":null,"topics":["babel","basic","class","es5","extend"],"latest_commit_sha":null,"homepage":null,"language":"HTML","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/WebReflection.png","metadata":{"files":{"readme":"README.md","changelog":null,"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":"2017-01-15T18:54:27.000Z","updated_at":"2021-03-25T01:08:13.000Z","dependencies_parsed_at":"2022-09-16T14:51:25.101Z","dependency_job_id":null,"html_url":"https://github.com/WebReflection/classtrophobic-es5","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WebReflection%2Fclasstrophobic-es5","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WebReflection%2Fclasstrophobic-es5/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WebReflection%2Fclasstrophobic-es5/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WebReflection%2Fclasstrophobic-es5/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/WebReflection","download_url":"https://codeload.github.com/WebReflection/classtrophobic-es5/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248799931,"owners_count":21163403,"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":["babel","basic","class","es5","extend"],"created_at":"2024-11-15T21:13:31.422Z","updated_at":"2025-10-31T16:02:29.085Z","avatar_url":"https://github.com/WebReflection.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Classtrophobic ES5 [![build status](https://secure.travis-ci.org/WebReflection/classtrophobic-es5.svg)](http://travis-ci.org/WebReflection/classtrophobic-es5) [![Coverage Status](https://coveralls.io/repos/github/WebReflection/classtrophobic-es5/badge.svg?branch=master)](https://coveralls.io/github/WebReflection/classtrophobic-es5?branch=master)\n\nProject [Classtrophobic](https://github.com/WebReflection/classtrophobic) can work on older browsers too.\n\nNo `class` or `Proxy` used in here, and the only caveat is that subclasses with a constructor must return the `super` instance.\n\n```js\nvar List = Class({\n  extends: Array,\n  constructor: function () {\n    // super might promote current instance\n    var self = this.super();\n    // be sure you use the right reference\n    self.push.apply(self, arguments);\n    // and remember to return it\n    return self;\n  },\n  push: function () {\n    // constructor a part, everything else is the same\n    this.super.push.apply(this, arguments);\n    // make push chainable for demo purpose\n    return this;\n  }\n});\n```\n\n\n\n### Which Version For My Targets?\n\nYou can test live both [classtrophobic](https://webreflection.github.io/classtrophobic/test.html) and [classtrophobic-es5](https://webreflection.github.io/classtrophobic-es5/test.html).\nIf the page turns out green, you're good to go!\n\nThe main difference is that ES5 version has a greedy runtime when it comes to `super` usage,\nwhile this original version uses real classes and delegate to Proxy access the `super` resolution,\nworking only when a method is accessed and per single method, as opposite of runtime setup for all methods in the es5 case.\n\n\u003csup\u003e\u003csub\u003eLuckily overrides are not the most frequent thing ever.\u003c/sub\u003e\u003c/sup\u003e\n\n\n\n## Requirements\nAt least the annex B `__proto__` accessor should be there.\nThis means pretty much every Mobile browser and every Desktop one, starting from IE11.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwebreflection%2Fclasstrophobic-es5","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwebreflection%2Fclasstrophobic-es5","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwebreflection%2Fclasstrophobic-es5/lists"}