{"id":15099578,"url":"https://github.com/kasra-sh/exir","last_synced_at":"2025-10-08T05:30:54.373Z","repository":{"id":57401247,"uuid":"279024078","full_name":"kasra-sh/exir","owner":"kasra-sh","description":"eXir Javascript Library","archived":true,"fork":false,"pushed_at":"2020-12-26T20:53:14.000Z","size":2411,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-08-09T05:51:45.770Z","etag":null,"topics":["front-end","frontend","frontend-framework","frontend-web","javascript-framework","javascript-library","webcomponents"],"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/kasra-sh.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-07-12T08:35:01.000Z","updated_at":"2023-01-28T01:08:22.000Z","dependencies_parsed_at":"2022-09-13T02:40:19.243Z","dependency_job_id":null,"html_url":"https://github.com/kasra-sh/exir","commit_stats":null,"previous_names":["kasra-sh/xeer-js"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/kasra-sh/exir","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kasra-sh%2Fexir","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kasra-sh%2Fexir/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kasra-sh%2Fexir/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kasra-sh%2Fexir/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kasra-sh","download_url":"https://codeload.github.com/kasra-sh/exir/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kasra-sh%2Fexir/sbom","scorecard":{"id":551286,"data":{"date":"2025-08-11","repo":{"name":"github.com/kasra-sh/exir","commit":"5ca4494defb2b1e4dc5b1b84b32ce5371245e75c"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.7,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/30 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":"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":"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":"Maintained","score":0,"reason":"project is archived","details":["Warn: Repository is archived."],"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"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":"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":"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":"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":"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":"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":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"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.txt:0","Info: FSF or OSI recognized license: MIT License: LICENSE.txt: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":0,"reason":"Project has not signed or included provenance with any releases.","details":["Warn: release artifact 0.7.1 not signed: https://api.github.com/repos/kasra-sh/exir/releases/31989397","Warn: release artifact 0.7.1 does not have provenance: https://api.github.com/repos/kasra-sh/exir/releases/31989397"],"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'","Warn: branch protection not enabled for branch 'release'"],"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"}}]},"last_synced_at":"2025-08-20T10:57:24.388Z","repository_id":57401247,"created_at":"2025-08-20T10:57:24.388Z","updated_at":"2025-08-20T10:57:24.388Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278892076,"owners_count":26063924,"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-08T02:00:06.501Z","response_time":56,"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":["front-end","frontend","frontend-framework","frontend-web","javascript-framework","javascript-library","webcomponents"],"created_at":"2024-09-25T17:23:47.230Z","updated_at":"2025-10-08T05:30:54.018Z","avatar_url":"https://github.com/kasra-sh.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n\u003cimg width=\"200px\" style=\"max-width: 70%\" src=\"https://raw.githubusercontent.com/kasra-sh/exir/master/.github/logo.png\"\u003e\n\u003c/p\u003e\n\u003cbr\u003e\n\u003cp align=\"center\"\u003e\n\u003ca href=\"https://npmjs.org/exir\"\u003e\u003cimg src=\"https://img.shields.io/npm/v/exir\" alt=\"npm\"\u003e\u003c/a\u003e\n\u003ca href=\"https://opensource.org/licenses/MIT\"\u003e\u003cimg src=\"https://img.shields.io/badge/License-MIT-informational.svg\" alt=\"License: MIT\" /\u003e\u003c/a\u003e\n\u003cimg src=\"https://img.shields.io/badge/Gzipped-15Kb-green\" alt=\"Gzipped Size\" /\u003e\n\u003cimg src=\"https://img.shields.io/badge/Compatibility-Mixed-informational\" alt=\"Compatibility ES5\" /\u003e\n\u003cimg src=\"https://img.shields.io/badge/node-\u003e=8-yellow\" alt=\"Node Version \u003e= 8\" /\u003e\n\u003cbr\u003e\n\u003ch1 align=\"center\"\u003e\u003cb\u003eeXir Javascript Library\u003c/b\u003e\u003c/h1\u003e\n\u003c/p\u003e\n\n- [What is eXir?](#what-is-exir)\n- [Why eXir?](#why-exir)\n- [Installation](#installation)\n  - [Package Manager](#package-manager)\n  - [From Source](#from-source)\n- [Getting Started](#getting-started)\n- [Documentation \u0026 Tutorials](https://kasra-sh.github.io/exir-docs)\n- [Examples](https://github.com/kasra-sh/exir/tree/master/examples/)\n\n## **What is eXir?**\nPersian word اکسیر, pronounced *ex'ear* is a mythical potion which transmutes things to a substance of higher value (iron to gold) or cures all illness.\u003cbr\u003e\n**eXir** is a lightweight javascript library (which is not just a sentence!), and it is supposed to cure dependency *infection*!\u003cbr\u003e\n\nWhat's included :\n- **Core Utils**\n  - Extended Collection utilities: chunk, omit, join, etc.\n  - Function helpers: throttle, debounce, etc.\n  - String analyzers and transformers.\n  - Concise Type Checking: isNull, isObj, etc.\n- **DOM Utils**\nBasic DOM manipulation utility functions.\n  - Flexible, Fool-Proof element/class/attribute/style CRUD\n  - Painless, Predicable Event Handling\n  - Optional native method wrappers for addEventListener, etc. for debugging or other purposes\n- **HTTP Client/Methods**\n  [Examples](https://github.com/kasra-sh/exir/tree/master/examples/)\n\u003cbr\u003e An elegant wrapper around XHR to satisfy your every request!\n  - Convenient Http Methods Get, Post, ...\n  - Supports Promises, async/await\n  - Timeout and retry\n  - Rate Limiting\n  - Request cancellation\n- **Web Components**\n  [Examples](https://github.com/kasra-sh/exir/tree/master/examples/)\n\u003cbr\u003e Reusable/Dynamic pure js components (css-in-js included).\n  - Dynamically Rendered Components (virtual dom)\n  - Reactive State Management *(beta)*\n  - Routing *(coming soon)*\n  \n*All* of the above in a bundle of *less than* 15Kb gzipped, which could be the size of a whole web app using only what's necessary (tree-shaking).\n\n## **Why eXir?**\nMany libraries/frameworks exist which claim to be fast/lightweight, are in fact what they claim to be in early releases or first stages of development,\nbut many start to get bigger and more complicated as they try their hardest to make everything more convenient or add some extra features.\nWhy make it so abstract and complicated in the first place and then make some more advanced tools to simplify it?\nMany web developers are dealing with the constant struggle of making frequent changes and optimization, not because some 16core workstation cannot handle extra lines of javascript,\nbut for the sake of those not nearly as powerful/optimized mobile browsers (Android, RPi, etc.), the very same devices which are first-class targets for PWAs.\n\n---\n\n## **Installation**\n### Package Manager\nWith your prefered package manager run :\n```shell script\n$ npm i exir\n```\n```shell script\n$ yarn add exir\n```\n### From Source\nClone the repository and install dependencies using your preferred package manager\n```sh\n$ git clone https://github.com/kasra-sh/exir.git\n$ cd exir\n$ npm install\n```\nTo regenerate extensions and bundles, make sure you have [Parcel](https://parceljs.org) installed globally:\n```sh\n$ npm run bundle\n```\n---\n\n## **Getting Started**\n\n### Bundles\nInclude a monolithic bundle file directly in your html file, bundle files having \"*-ext\" suffix include extensions.\n```html\n\u003c!-- Modern !--\u003e\n  \u003cscript src=\"exir-bundle-ext.js\"\u003e\u003c/script\u003e\n\u003c!-- Legacy !--\u003e\n  \u003cscript src=\"exir-bundle-legacy-ext.js\"\u003e\u003c/script\u003e\n  \u003cscript\u003e\n    var obj = {\n        ABC: \"text1\",\n        ACD: \"text2\",\n        BAR: 1,\n        Obj1: { name: \"jack\" , id: 1},\n        Obj2: { name: \"karen\", id: 2},\n        Obj3: { name: \"jack\" , id: 3},\n        Obj3: { name: \"karen\", id: 4},\n    }\n    console.log(obj.$filter((v,k)=\u003ek.$startsWith('A')));\n    // Outputs object { ABC: \"text1\", ACD: \"text2\" }\n    \n    console.log(obj.$filter(['ABC']));\n    // Outputs object { ABC: \"text1\" }\n\n    console.log(obj.$filter({name: \"jack\"}));\n    // Outputs object { Obj1: { name: \"jack\", id: 1 }, Obj3: { name: \"jack\", id: 3 }}\n\n    console.log(obj.$filter({name: X.ANY}));\n    // Outputs object {\n    //    Obj1: { name: \"jack\" , id: 1},\n    //    Obj2: { name: \"karen\", id: 2},\n    //    Obj3: { name: \"jack\" , id: 3},\n    //    Obj3: { name: \"karen\", id: 4},\n    // }\n  \u003c/script\u003e\n\u003c!-- ... !--\u003e\n```\n### Modules\nCommonJS `require()` example:\n```js\n// Core\n// namespace\nconst X = require(\"exir/core\");\n// functions\nconst {join} = require(\"exir/core/collections\");\nconst {debounce} = require(\"exir/core/functions\");\n\n// Dom\n// namespace\nconst Dom = require(\"exir/dom\");\n// functions\nconst {toggleClass} = require(\"exir/dom/classes\");\n\n// Http\n// namespace\nconst Http = require(\"exir/http\");\n// http methods\nconst {sendGet, Post} = require(\"exir/http/methods\");\n// http client\nconst {XHttpClient} = require(\"exir/http/client\");\n\n// View-Model\nconst {mount, Component, VNode} = require(\"exir/vm/app\");\n\n// All Extensions\nrequire(\"exir/ext\");\n// Collection Extensions\nrequire(\"exir/ext/collections.ext\");\n// Dom Extensions\nrequire(\"exir/ext/dom.ext\");\n```\n\nECMAScript Modules(ESM) `import` example:\n```js\n// Core\nimport {join, flatMap, debounce} from \"exir/core/collections\"\n\n// Dom\nimport {css, toggleClass, event} from \"exir/dom\"\n\n// Http\nimport {XHttpClient, Get, sendPost} from \"exir/http\"\n\n// View-Model\nimport {mount, Component, VNode} from \"exir/vm/app\"\n\n// All Extensions\nimport \"exir/ext\";\n// Collection Extensions\nimport \"exir/ext/collections.ext\";\n// Dom Extensions\nimport \"exir/ext/dom.ext\";\n```\n\nAlso read [Tutorials and Documentation](https://kasra-sh.github.io/exir-docs)\n\n\n## Disclaimer\nThis project is under heavy development, some parts may change, break or be removed.\u003cbr\u003e\nDocumentation is not complete *yet*, each part's documentation will be added as soon as it seems stable enough.\u003cbr\u003e\nParcel's zero-config has helped a LOT but is not a necessity, it is completely fine to use another bundler/transpiler like Webpack, Rollup or other \"magic\" tools.\neXir is safe to be used beside other libraries, *although* extensions modify Object prototypes which many deem dangerous, unnecessary or whatever else, use them at your own risk!","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkasra-sh%2Fexir","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkasra-sh%2Fexir","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkasra-sh%2Fexir/lists"}