{"id":15294920,"url":"https://github.com/omarefg/miru","last_synced_at":"2025-10-23T07:58:24.134Z","repository":{"id":57133039,"uuid":"325656096","full_name":"omarefg/miru","owner":"omarefg","description":"A lightweight library that allows you to create reactive components using vanilla javascript","archived":false,"fork":false,"pushed_at":"2020-12-30T22:39:28.000Z","size":106,"stargazers_count":7,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-09-22T03:06:48.041Z","etag":null,"topics":["miru","react","reactive-components","vanilla-javascript","vuejs"],"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/omarefg.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}},"created_at":"2020-12-30T21:58:11.000Z","updated_at":"2022-02-22T12:01:42.000Z","dependencies_parsed_at":"2022-09-03T13:25:02.746Z","dependency_job_id":null,"html_url":"https://github.com/omarefg/miru","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/omarefg/miru","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/omarefg%2Fmiru","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/omarefg%2Fmiru/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/omarefg%2Fmiru/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/omarefg%2Fmiru/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/omarefg","download_url":"https://codeload.github.com/omarefg/miru/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/omarefg%2Fmiru/sbom","scorecard":{"id":705879,"data":{"date":"2025-08-11","repo":{"name":"github.com/omarefg/miru","commit":"b5d08e3c1536cb652421592c32054c2b7b774fa0"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":1.7,"checks":[{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Code-Review","score":0,"reason":"Found 0/6 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":0,"reason":"19 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-968p-4wvh-cqc8","Warn: Project is vulnerable to: GHSA-67hx-6x53-jw92","Warn: Project is vulnerable to: GHSA-93q8-gq69-wqmw","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg","Warn: Project is vulnerable to: GHSA-w8qv-6jwh-64r5","Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275","Warn: Project is vulnerable to: GHSA-w573-4hg7-7wgq","Warn: Project is vulnerable to: GHSA-ww39-953v-wcq6","Warn: Project is vulnerable to: GHSA-43f8-2h32-f4cj","Warn: Project is vulnerable to: GHSA-9c47-m6qq-7p4h","Warn: Project is vulnerable to: GHSA-29mw-wpgm-hmr9","Warn: Project is vulnerable to: GHSA-35jh-r3h4-6jhm","Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv","Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3","Warn: Project is vulnerable to: GHSA-xvch-5gv4-984h","Warn: Project is vulnerable to: GHSA-hj48-42vr-x3v9","Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw","Warn: Project is vulnerable to: GHSA-j8xg-fqg3-53r7"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-22T06:33:10.054Z","repository_id":57133039,"created_at":"2025-08-22T06:33:10.054Z","updated_at":"2025-08-22T06:33:10.054Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":280583894,"owners_count":26355258,"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-10-23T02:00:06.710Z","response_time":142,"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":["miru","react","reactive-components","vanilla-javascript","vuejs"],"created_at":"2024-09-30T17:08:00.164Z","updated_at":"2025-10-23T07:58:24.099Z","avatar_url":"https://github.com/omarefg.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Miru\nMiru is a lightweight library that allows you to create reactive components using vanilla javascript\n\n## Instructions\n\n```bash\nnpm i @omarefg/miru\n\nyarn add @omarefg/miru\n```\n\n## Example\n\nFirst create your component\n\n```js\nimport Miru from '@omarefg/miru'\n\n// First create a View function, this function that must return an HMTL element\nfunction View() {\n  const { counter } = this.state;\n  const { containerStyle, buttonStyle } = this.props;\n  const container = document.createElement('div');\n  const prevButton = document.createElement('button');\n  const nextButton = document.createElement('button');\n  const count = document.createElement('span');\n\n  count.innerText = counter;\n  prevButton.innerText = 'Prev';\n  nextButton.innerText = 'Next';\n\n  Object.keys(containerStyle).forEach((key) =\u003e {\n    container.style[key] = containerStyle[key];\n  });\n\n  Object.keys(buttonStyle).forEach((key) =\u003e {\n    prevButton.style[key] = buttonStyle[key];\n    nextButton.style[key] = buttonStyle[key];\n  });\n\n  prevButton.addEventListener('click', this.handleButtonPressed(-1));\n  nextButton.addEventListener('click', this.handleButtonPressed(1));\n\n  container.appendChild(prevButton);\n  container.appendChild(count);\n  container.appendChild(nextButton);\n\n  return container;\n}\n\n// Now, this is your component\n// It must return a Miru instance\n// The Miru instance receive two parameters\n// 1. The view\n// 2. The config object\nexport default MySuperFancyCounterComponent = (props) =\u003e new Miru(View, {\n  props,\n  defaultProps: {\n    containerStyle: {\n      width: '100vw',\n      height: '100vh',\n      display: 'flex',\n      justifyContent: 'center',\n      alignItems: 'center',\n    },\n    buttonStyle: {\n      padding: '10px 30px',\n      backgroundColor: 'green',\n      borderRadius: '5px',\n      border: 'none',\n      color: 'white',\n      margin: '0 5px',\n    },\n  },\n  handlers: {\n    handleButtonPressed(step) {\n      const self = this;\n      return () =\u003e {\n        self.update({ counter: self.state.counter + step });\n      };\n    },\n  },\n  state: {\n    counter: 0,\n  },\n});\n```\n\nNow you can call your component\n\n```js\nimport MySuperFancyCounterComponent from 'path/to/MySuperFancyCounterComponent'\n\ndocument.getElementById('app').appendChild(MySuperFancyCounterComponent())\n```\n\n\n\n## Config object\n\n```js\n{\n    props: {}, // The props object, it represents the data passed to the component\n    defaultProps: {}, // It represent the default value for the props in case the value was not passed\n    handlers: {}, // All the logic your component will be using will be inside this object, then access to the handler just using this.handlerName\n    state: {} // The state object\n}\n```\n\n## API\n\n- update: Must receive an object (the state) inside, this method triggers an update in the component with the new state.\n\n## Why should I use Miru?\n\nWhy not?🤷🤷‍♀️ Give it a shot if you want a simple reactive SPA and dont want the tons of dependencies.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fomarefg%2Fmiru","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fomarefg%2Fmiru","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fomarefg%2Fmiru/lists"}