{"id":39834429,"url":"https://github.com/vikasburman/flairjs","last_synced_at":"2026-01-18T13:19:26.258Z","repository":{"id":21269664,"uuid":"92058480","full_name":"vikasburman/flairjs","owner":"vikasburman","description":"FlairJS - True Object Oriented JavaScript","archived":false,"fork":false,"pushed_at":"2023-01-04T21:40:05.000Z","size":16195,"stargazers_count":5,"open_issues_count":15,"forks_count":0,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-04-15T07:40:11.660Z","etag":null,"topics":["data-abstraction","encapsulation","es6","inheritance","javascript","javascript-library","object-oriented-programming","oops","polymorphism"],"latest_commit_sha":null,"homepage":"https://flairjs.com","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/vikasburman.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2017-05-22T13:45:43.000Z","updated_at":"2023-09-06T19:50:18.000Z","dependencies_parsed_at":"2023-01-11T21:08:45.359Z","dependency_job_id":null,"html_url":"https://github.com/vikasburman/flairjs","commit_stats":null,"previous_names":[],"tags_count":36,"template":false,"template_full_name":null,"purl":"pkg:github/vikasburman/flairjs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vikasburman%2Fflairjs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vikasburman%2Fflairjs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vikasburman%2Fflairjs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vikasburman%2Fflairjs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vikasburman","download_url":"https://codeload.github.com/vikasburman/flairjs/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vikasburman%2Fflairjs/sbom","scorecard":{"id":921419,"data":{"date":"2025-08-11","repo":{"name":"github.com/vikasburman/flairjs","commit":"4e64d58cb18ad6ca5161b213e92d778bf8e0b245"},"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":"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":"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":"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/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":"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":"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":"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":"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":"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":"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":"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":"Vulnerabilities","score":0,"reason":"46 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-6chw-6frg-f759","Warn: Project is vulnerable to: GHSA-v88g-cgmw-v5xw","Warn: Project is vulnerable to: GHSA-93q8-gq69-wqmw","Warn: Project is vulnerable to: GHSA-pp7h-53gx-mx7r","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-gxpj-cx7g-858c","Warn: Project is vulnerable to: GHSA-w573-4hg7-7wgq","Warn: Project is vulnerable to: GHSA-qgfr-5hqp-vrw9","Warn: Project is vulnerable to: GHSA-jc84-3g44-wf2q","Warn: Project is vulnerable to: GHSA-74fj-2j2h-c42q","Warn: Project is vulnerable to: GHSA-pw2r-vq6v-hr8c","Warn: Project is vulnerable to: GHSA-jchw-25xp-jwwc","Warn: Project is vulnerable to: GHSA-cxjh-pqwp-8mfp","Warn: Project is vulnerable to: GHSA-8jmw-wjr8-2x66","Warn: Project is vulnerable to: GHSA-ww39-953v-wcq6","Warn: Project is vulnerable to: GHSA-pfrx-2q88-qq97","Warn: Project is vulnerable to: GHSA-43f8-2h32-f4cj","Warn: Project is vulnerable to: GHSA-pfq8-rq6v-vf5m","Warn: Project is vulnerable to: GHSA-rc47-6667-2j5j","Warn: Project is vulnerable to: GHSA-6x33-pw7p-hmpq","Warn: Project is vulnerable to: GHSA-qqgx-2p2h-9c37","Warn: Project is vulnerable to: GHSA-9c47-m6qq-7p4h","Warn: Project is vulnerable to: GHSA-p6mc-m468-83gw","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-vh95-rmgr-6w4m","Warn: Project is vulnerable to: GHSA-xvch-5gv4-984h","Warn: Project is vulnerable to: GHSA-hj48-42vr-x3v9","Warn: Project is vulnerable to: GHSA-566m-qj78-rww5","Warn: Project is vulnerable to: GHSA-hwj9-h5mp-3pm3","Warn: Project is vulnerable to: GHSA-7fh5-64p2-3v2j","Warn: Project is vulnerable to: GHSA-gqgv-6jq5-jjj9","Warn: Project is vulnerable to: GHSA-hrpp-h998-j3pp","Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw","Warn: Project is vulnerable to: GHSA-52f5-9888-hmc6","Warn: Project is vulnerable to: GHSA-w5p7-h5w8-2hfq","Warn: Project is vulnerable to: GHSA-7p7h-4mm5-852v","Warn: Project is vulnerable to: GHSA-j8xg-fqg3-53r7","Warn: Project is vulnerable to: GHSA-p9pc-299p-vxgp"],"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-25T03:38:12.705Z","repository_id":21269664,"created_at":"2025-08-25T03:38:12.705Z","updated_at":"2025-08-25T03:38:12.705Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28536751,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-18T13:04:05.990Z","status":"ssl_error","status_checked_at":"2026-01-18T13:01:44.092Z","response_time":98,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["data-abstraction","encapsulation","es6","inheritance","javascript","javascript-library","object-oriented-programming","oops","polymorphism"],"created_at":"2026-01-18T13:19:23.379Z","updated_at":"2026-01-18T13:19:26.244Z","avatar_url":"https://github.com/vikasburman.png","language":"JavaScript","readme":"[Flair.js](https://flairjs.com)\n---\n\n_True object orientated features for plain vanilla JavaScript_\n\n[![Build Status](https://travis-ci.com/vikasburman/flairjs.svg?branch=master)](https://travis-ci.com/vikasburman/flairjs) \n[![Dependencies](https://david-dm.org/vikasburman/flairjs.svg)](https://david-dm.org/vikasburman/flairjs)\n[![Dev Dependencies](https://david-dm.org/vikasburman/flairjs/dev-status.svg)](https://david-dm.org/vikasburman/flairjs?type=dev)\n[![Known Vulnerabilities](https://snyk.io/test/github/vikasburman/flairjs/badge.svg?targetFile=package.json)](https://snyk.io/test/github/vikasburman/flairjs?targetFile=package.json) \n[![MIT license](http://img.shields.io/badge/license-MIT-brightgreen.svg)](http://opensource.org/licenses/MIT)\n[![npm version](https://badge.fury.io/js/flairjs.svg)](https://badge.fury.io/js/flairjs)\n\n\nIntroduction \n---\n\nJavaScript is everywhere, and its popularity has grown tremendously. There has been several enhancements done in the language to make it more powerful. ES6/ES7 has added several object-oriented features to the language, but the bottleneck has always been the varied support of these features by web browsers, thus restricting their large-scale usage.\n\nDue to rich and long history of JavaScript, several compatibility issues do exists. Expecting to have all awesome object-oriented concepts as they exists in any new languages like C#, Java, etc., is tough. Of course there is TypeScript, but that is another language. Even though it 'compiles' or 'transpiles' to native JavaScript, it is not 'the' JavaScript. \n\n_Flair.js_ takes the problem head-on and brings majority of the awesomeness of C#/Java features in JavaScript, natively! \n\nBasic object oriented concepts like, inheritance, encapsulation, polymorphism, events, together with advance features like aspect oriented and attribute based programming, custom attributes, serialization, dependency injection and reflection, etc. are all nicely baked in this JavaScript library. \n\nFurthermore, all of these are available via pure JavaScript syntax, without any build-time transpilation or compilation of your codebase. What you write, is what gets executed. No change!\n                  \nThe forward-looking and future-proof design of _Flair.js_, plays well with ongoing ECMAScript advancements. While executing code, behind the scenes, new JavaScript constructs are used wherever possible.\n\n_Flair.js_ works in web browsers and in other JavaScript environments like [Node](https://nodejs.org) and [NW.js](https://nwjs.io/).\n\nFeatures\n---\n* Pure JavaScript, No external dependencies, ~25k min+gz.\n* **Inheritance:** Single inheritance chain, Multiple inheritance via Mixins, Restrictions via 'sealed', etc. \n* **Encapsulation:** True Public, Private and Protected members etc.\n* **Polymorphism:** Abstract classes, Interfaces, Method overloading and overriding, Restrictions via 'sealed', Dynamic casting via 'as', etc.\n* **Mature Base Types:** Class, Struct, Interface, Mixin, Enum, Exception, Resource, Assembly, AppDomain, etc.\n* **Aspect orientation:** Aspect definitions with Before, After and Around advise weaving on methods.\n* **Attributes based programming:** Inbuilt system attributes like 'readonly', 'sealed' and many more with full-blown support of defining custom attributes and its usage over class and class members.\n* **Dependency injection:** Object life-cycle management via DI container and constructor, method and property injection of other types.\n* **Serialization:** Seamless serialization and deserialization of class objects for persistance and transfer.\n* **Reflection:** Meta programming made easy with advance reflection support on all live objects and types.\n* **Type organization:** Organization of types under individual namespaces and assemblies which are loaded in specific assembly ;load context under primary or secondary app domains.\n* **Others:** Singleton, Static classes and members, State storage, Event handling, Async method calls, Auto-disposable objects, deprecate member notifications, Telemetry, Extension ports, etc.\n\nGetting Started\n---\n**1. Install**\n\nInstall using `npm install flairjs` or download [latest release](https://github.com/vikasburman/flairjs/releases/latest). All you need is to have `flair.min.js` available, whatever approach you want to take.\n\n\n**2. Include**\n\nInclude Flair.js in your html page or load it as a module, and initialize.\n\n\u003e There are no external dependencies of this library, therefore feel free to include in whatever order required. However this must be loaded before any `*.js` file which uses Flair.js features, for those to be available.\n\nWhen using on client side:\n```html\n\u003cscript type=\"text/javascript\" src=\"path-to-flair/flair.min.js\"\u003e\u003c/script\u003e\n```\n\n\u003e Flair.js also support module loaders and can be loaded via `require` or other module loading techniques.\n\nWhen using on server side:\n```javascript\nconst flair = require('flairjs');\n```\n\n**3. Play with Objects**\n\nWith flair objects available, JavaScript now has the awesomeness of C#/Java. Define and play with objects.\n\nHere is a very basic example:\n\n```javascript\n\n// note: when code is wrapped in a flair Assembly, such imports are not required\nconst { Class, $$, event, using } = flair; \n\n// define Vehicle class\nlet Vehicle = Class('Vehicle', function() {\n    \n    // constructor\n    this.construct = (capacity) =\u003e {\n        this.cc = capacity;\n        console.log('Vehicle constructed!');    \n    };\n    \n    // property\n    this.cc = 0;\n\n    // method\n    this.start = () =\u003e {\n        // raise event with current time of start\n        this.started(Date.now());\n    };\n\n    // event\n    this.started = event((time) =\u003e {\n        return { when: time }; // event args\n    });\n});\n\n```\n\n```javascript\n\n// define Car, derived from Vehicle\nlet Car = Class('Car', Vehicle, function() {\n    \n    $$('override'); // constructor overriding\n    this.construct = (base, model, capacity) =\u003e {\n        // call base class's constructor\n        base(capacity);\n\n        // note: model is readonly, but can still be defined in constructor\n        this.model = model;\n\n        // subscribe to started event of base class\n        this.started.add(this.onStarted);\n        \n        console.log('Car constructed!');    \n    });\n\n    $$('readonly'); // readonly property\n    this.model = '';\n\n    // private event handler\n    $$('private');\n    this.onStarted = (e) =\u003e {\n        // read event args, this and parent class properties\n        console.log(`${this.model} (${this.cc}cc) ${e.name} at: ${e.args.when}`);\n    };\n\n    // dispose car via destructor\n    this.dispose = () =\u003e {\n        console.log('Car disposed!');\n    };     \n});\n\n```\n\n```javascript\n\n// auto disposable block\nusing(new Car('SUV', 3000), (suv) =\u003e {\n    suv.start();\n});\n\n```\n\nExecuting above code will show following on console: \n```\nVehicle constructed!\n\nCar constructed!\n\nSUV (3000cc) started at: (time)\n\nCar disposed!\n```\n\nExplore The Power\n---\nWhat you have seen above is the tip of the iceberg. Flair.js adds a lot of firepower to JavaScript that makes building complex JavaScript projects as easy as with C# or Java.\n\nTo tap the real power of Flair.js, explore the [Guides](https://flairjs.com/#/guides) to understand concepts and behaviors, [API](https://flairjs.com/#/api) to know details of the programming interface for various constructs, and finally [Examples](https://flairjs.com/#/examples) to see working code, showcasing all the key concepts in action. \n\nHowever, before you delve deep into any of these areas, begin with getting an [Overview](https://flairjs.com/#/overview) first.\n\nRelease History\n---\nSee the changelog [here](https://flairjs.com/#/changelog).\n\nLicense\n---\nCopyright \u0026copy; 2017-2019 Vikas Burman.\u003cbr/\u003e\nReleased under the terms of the [MIT license](https://github.com/vikasburman/flairjs/blob/master/LICENSE). Authored and maintained by [Vikas Burman](https://www.linkedin.com/in/vikasburman/). \n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvikasburman%2Fflairjs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvikasburman%2Fflairjs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvikasburman%2Fflairjs/lists"}