{"id":15916976,"url":"https://github.com/ruben-arushanyan/base-classes","last_synced_at":"2025-03-24T07:31:46.231Z","repository":{"id":59963812,"uuid":"540039570","full_name":"Ruben-Arushanyan/base-classes","owner":"Ruben-Arushanyan","description":"Useful JavaScript base classes for efficient and quick solutions to common problems.","archived":false,"fork":false,"pushed_at":"2023-10-03T23:26:07.000Z","size":1591,"stargazers_count":11,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-16T03:17:41.079Z","etag":null,"topics":["base-class","class","class-based","constructor","encapsulation","extends","inheritance","inherited","javascript","object-oriented","oop","parent-class","superclass"],"latest_commit_sha":null,"homepage":"https://base-classes.js.org","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/Ruben-Arushanyan.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":"Ruben-Arushanyan","custom":["https://www.paypal.me/rubenarushanyan"]}},"created_at":"2022-09-22T15:08:11.000Z","updated_at":"2025-01-06T18:17:31.000Z","dependencies_parsed_at":"2023-02-01T05:31:14.882Z","dependency_job_id":null,"html_url":"https://github.com/Ruben-Arushanyan/base-classes","commit_stats":null,"previous_names":[],"tags_count":21,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ruben-Arushanyan%2Fbase-classes","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ruben-Arushanyan%2Fbase-classes/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ruben-Arushanyan%2Fbase-classes/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ruben-Arushanyan%2Fbase-classes/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Ruben-Arushanyan","download_url":"https://codeload.github.com/Ruben-Arushanyan/base-classes/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245227438,"owners_count":20580884,"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":["base-class","class","class-based","constructor","encapsulation","extends","inheritance","inherited","javascript","object-oriented","oop","parent-class","superclass"],"created_at":"2024-10-06T18:07:47.653Z","updated_at":"2025-03-24T07:31:45.784Z","avatar_url":"https://github.com/Ruben-Arushanyan.png","language":"JavaScript","readme":"# [JavaScript Base Classes](https://base-classes.js.org)\n\n\u003e You can find the full documentation on the [website](https://base-classes.js.org).\n## Description\n\nUseful JavaScript base classes for efficient and quick solutions to common problems.\n\n\n## Installation\n\n```bash\nnpm install base-classes\n```\n\n## [Store](https://base-classes.js.org/docs/store)\n\nThe `Store` is a base class that provides the necessary methods and attributes to organize state management efficiently and easily.\n### Import\n\n```js\nimport {Store} from 'base-classes'\n```\n```js\nconst {Store} = require('base-classes')\n```\n\n### Basic Usage\n\n```js\nimport {Store} from 'base-classes'\n\nclass MyClass extends Store {\n    state = { count: 1 }\n}\n\nconst myClass = new MyClass()\n\nmyClass.subscribe((state, prevState) =\u003e {\n    console.log('state changed:', state)\n})\nmyClass.updateState((state) =\u003e {\n    return {...state, count: 2}\n})\n```\n\n### [API](https://base-classes.js.org/docs/store/#api)\n\n- [constructor](https://base-classes.js.org/docs/store/#constructor)\n- [state](https://base-classes.js.org/docs/store/#state)\n- [updateState](https://base-classes.js.org/docs/store/#updatestate)\n- [subscribe](https://base-classes.js.org/docs/store/#subscribe)\n- [subscribeSelector](https://base-classes.js.org/docs/store/#subscribeselector)\n- [prevState](https://base-classes.js.org/docs/store/#prevstate)\n\n\u003c/br\u003e\n\u003c/br\u003e\n\n\n## [Contributing](https://github.com/ruben-arushanyan/base-classes/blob/master/CONTRIBUTING.md)\n\nRead our [contributing guide](https://github.com/ruben-arushanyan/base-classes/blob/master/CONTRIBUTING.md) to learn about our development process.\n\n## [Code of Conduct](https://github.com/ruben-arushanyan/base-classes/blob/master/CODE_OF_CONDUCT.md)\n\nThis project has adopted the [Contributor Covenant](https://www.contributor-covenant.org) as its Code of Conduct, and we expect project participants to adhere to it. Please read the [full text](https://github.com/ruben-arushanyan/base-classes/blob/master/CODE_OF_CONDUCT.md) so that you can understand what actions will and will not be tolerated.\n\n## Authors\n\n- [Ruben Arushanyan](https://github.com/ruben-arushanyan)\n\n## License\n\n[MIT License](https://github.com/Ruben-Arushanyan/base-classes/blob/master/LICENSE)\n\n\n","funding_links":["https://github.com/sponsors/Ruben-Arushanyan","https://www.paypal.me/rubenarushanyan"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fruben-arushanyan%2Fbase-classes","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fruben-arushanyan%2Fbase-classes","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fruben-arushanyan%2Fbase-classes/lists"}