{"id":29717686,"url":"https://github.com/dashersw/regie","last_synced_at":"2025-07-24T08:10:49.075Z","repository":{"id":46311228,"uuid":"166585290","full_name":"dashersw/regie","owner":"dashersw","description":"An observable state management tool for vanilla JS applications based on Proxies","archived":false,"fork":false,"pushed_at":"2024-05-01T12:38:59.000Z","size":274,"stargazers_count":79,"open_issues_count":2,"forks_count":9,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-04-05T16:22:58.507Z","etag":null,"topics":["es6-proxies","state-management","state-manager","vanilla-js"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/dashersw.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":"2019-01-19T19:32:37.000Z","updated_at":"2025-02-05T19:16:01.000Z","dependencies_parsed_at":"2024-05-01T13:35:38.852Z","dependency_job_id":"0ab3fcf9-82d9-4fc7-803a-895c45aebaca","html_url":"https://github.com/dashersw/regie","commit_stats":null,"previous_names":[],"tags_count":38,"template":false,"template_full_name":null,"purl":"pkg:github/dashersw/regie","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dashersw%2Fregie","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dashersw%2Fregie/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dashersw%2Fregie/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dashersw%2Fregie/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dashersw","download_url":"https://codeload.github.com/dashersw/regie/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dashersw%2Fregie/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266813462,"owners_count":23988545,"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","status":"online","status_checked_at":"2025-07-24T02:00:09.469Z","response_time":99,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["es6-proxies","state-management","state-manager","vanilla-js"],"created_at":"2025-07-24T08:10:44.605Z","updated_at":"2025-07-24T08:10:49.068Z","avatar_url":"https://github.com/dashersw.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# regie\n\n[![npm version](https://badge.fury.io/js/regie.svg)](https://badge.fury.io/js/regie)\n[![Build Status](https://travis-ci.org/dashersw/regie.svg?branch=master)](https://travis-ci.org/dashersw/regie)\n[![Coverage Status](https://coveralls.io/repos/github/dashersw/regie/badge.svg)](https://coveralls.io/github/dashersw/regie)\n[![dependencies Status](https://david-dm.org/dashersw/regie/status.svg)](https://david-dm.org/dashersw/regie)\n[![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://raw.githubusercontent.com/dashersw/regie/master/LICENSE)\n\n**An observable state management tool for vanilla JS applications based on Proxies**\n\n## Example\n\n```js\nconst regie = require('regie')\n\nconst initialState = {\n  items: []\n}\n\nconst { state, observe } = regie({ initialState })\n\nobserve(state.items, (newValue, change) =\u003e {\n  console.log(`new value is ${newValue} with change:`, change)\n})\n\nstate.items.push('first!')\n```\n\n## Installation\n\n```bash\nnpm i regie\n```\n\n## Usage\n\n`observe` function accepts many forms, including a string path and a predicate. All of the following are the same:\n\n```js\nconst regie = require('regie')\n\nconst initialState = {\n  items: []\n}\n\nconst { state, observe } = regie({ initialState })\n\nobserve(state.items, handler)\nobserve(state =\u003e state.items, handler)\nobserve(() =\u003e state.items, handler)\nobserve('items', handler)\n\nconst items = state.items\n\nobserve(items, handler)\nobserve(() =\u003e items, handler)\n```\n\nregie also allows you to watch primitive values in a certain form. The following examples observe the _future_ first element of the array:\n\n```js\nobserve(() =\u003e state.items[0], handler)\nobserve('items.0', handler)\n```\n\nand the following examples observe _even farther into the future_ details of the first element of the array:\n\n```js\nobserve(() =\u003e state.items[0].name, handler)\nobserve('items.0.name', handler)\n```\n\n## License\n\nMIT License\n\nCopyright (c) 2019 Armagan Amcalar\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdashersw%2Fregie","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdashersw%2Fregie","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdashersw%2Fregie/lists"}