{"id":25731321,"url":"https://github.com/hieunc229/element-creator","last_synced_at":"2026-05-15T21:03:20.784Z","repository":{"id":57222112,"uuid":"110196161","full_name":"hieunc229/element-creator","owner":"hieunc229","description":"Element Creator helps you manage, create HTML DOM elements quick and easy","archived":false,"fork":false,"pushed_at":"2018-06-18T03:44:12.000Z","size":32,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-08-31T21:57:08.916Z","etag":null,"topics":["element-create","element-ui","javascript","library","ui","vdom","virtual-dom"],"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/hieunc229.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":"2017-11-10T03:08:59.000Z","updated_at":"2024-05-17T13:46:16.000Z","dependencies_parsed_at":"2022-09-04T04:51:18.507Z","dependency_job_id":null,"html_url":"https://github.com/hieunc229/element-creator","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/hieunc229/element-creator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hieunc229%2Felement-creator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hieunc229%2Felement-creator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hieunc229%2Felement-creator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hieunc229%2Felement-creator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hieunc229","download_url":"https://codeload.github.com/hieunc229/element-creator/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hieunc229%2Felement-creator/sbom","scorecard":{"id":464308,"data":{"date":"2025-08-11","repo":{"name":"github.com/hieunc229/element-creator","commit":"743455d276cf0a3fdda2ac6d1c45f4db81e38efd"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"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":"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":"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":"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":"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":"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":"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":"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":"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":"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"}}]},"last_synced_at":"2025-08-19T12:03:00.267Z","repository_id":57222112,"created_at":"2025-08-19T12:03:00.267Z","updated_at":"2025-08-19T12:03:00.267Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274879245,"owners_count":25367095,"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-09-12T02:00:09.324Z","response_time":60,"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":["element-create","element-ui","javascript","library","ui","vdom","virtual-dom"],"created_at":"2025-02-26T02:45:53.958Z","updated_at":"2026-05-15T21:03:20.689Z","avatar_url":"https://github.com/hieunc229.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# element-creator [![Build Status](https://travis-ci.org/hieunc229/element-creator.svg?branch=master)](https://travis-ci.org/hieunc229/element-creator) [![size](http://img.badgesize.io/https://unpkg.com/element-creator@1.0.3/build/element-creator.js?max=100000\u0026softmax=200000)](https://unpkg.com/element-creator@1.0.2/build/element-creator.min.js) [![npm version](https://badge.fury.io/js/element-creator.svg)](https://www.npmjs.com/package/element-creator) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n\nA library that helps to create interactive HTML elements (virtual dom) easily. Inspired by MithrilJs framework.\n\n- [Installation](#installation)\n- [Examples](#examples)\n- [Documentation](#documentation)\n\n## Installation\n\nelement-creator is available on NPM and as a Javascript library.\n\nInstall on NPM\n\n```ssh\nnpm install element-creator\n```\n\nOr include on html file on unpkg\n```html\n\n\u003cscript  type=\"text/javascript\" src=\"https://unpkg.com/element-creator@1.0.5/build/element-creator.min.js\"\u003e\u003c/script\u003e\n```\n\n## Examples:\n\nA one page content example located at `build/index.html`. Or a quick demo below\n\n```javascript\n// using node with es6, otherwise var e = require('element-creator');\nimport e from 'element-creator';\n\nvar myDiv = e('div#myElement.class__1[name=awesome-div]', 'My awesome div', {\n    on: { 'click': function(e) {\n        alert('You have clicked on My awesome div');\n    }}\n})\n```\n\nThe variable `myDiv` above generates `div` html element with `click` event that prop an alert message.\n```html\n\u003cdiv id=\"myElement\" class=\"class__1\" name=\"awesome-div\"\u003eMy awesome div\u003c/div\u003e\n```\n\n\n## Documentation\n\nelement-creator contains **Elementextended** (or wrapper) which wraps/adds interactive functions such as **.find**, **.all** to standard element and **ElementCreator** which creates HTML elements then wrap and return an ElementExtended element.\n\n### ElementCreator\n\n```javascript\n// vdom return new element\nvar vdom = e(elementString, children, options)\n```\nWhere:\n\n- **elementString** is a string that specify the element parameters creation with following pattern:\n\n`{elementType}{(*)elementId}{(*)elementClasses}{(*)elementAttributes}`\n\n(*) is optional\n\n| Parameters        | Default | Description                           | Example |\n|-------------------|---------|---------------------------------------|---------|\n| elementType       | div     | Type of element or element's tag type | `p` or `h1`. Use default incase left empty |\n| elementId         |         | Element's id                          | `#firstParagraph` |\n| elementClasses    |         | Element classes                       | `.class__1` or multiple classes `.class__1.class_2` |\n| elementAtrributes |         | Element attributes                    | `[name=title]` or multiple attributes `[name=title,ref=titleRef]`|\n\n- **children** is text node or html elements that stay inside the element.\n- **options** os other configuration including:\n\n  - on: add event listener\n  - attrs: element's attributes\n  - data: element's data\n  \n### ElementExtended\n  \n```javascript\n// wrappedElement return a html element within the html body with more interactive functions\nvar wrappedElement = e.wrap(querySelector, isMultiple)\n```\n\nWhere:\n- **querySelector** is standard query selector string for example `h1` will look for heading `h1`, `.class__1` will look for any element has class `.class__1`.\n- **isMultiple** is `false` by default. If set to `true` it will return an array of element match with querySelector.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhieunc229%2Felement-creator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhieunc229%2Felement-creator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhieunc229%2Felement-creator/lists"}