{"id":20527212,"url":"https://github.com/raulil/pakertaja","last_synced_at":"2025-09-08T07:40:36.114Z","repository":{"id":12836787,"uuid":"72938211","full_name":"RauliL/pakertaja","owner":"RauliL","description":"JavaScript library for building HTML.","archived":false,"fork":false,"pushed_at":"2025-02-05T08:39:48.000Z","size":704,"stargazers_count":9,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-08-23T01:43:14.539Z","etag":null,"topics":["dom","html","html-elements","javascript"],"latest_commit_sha":null,"homepage":"https://rauli.dev/pakertaja/","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/RauliL.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,"zenodo":null}},"created_at":"2016-11-05T16:22:38.000Z","updated_at":"2025-02-05T08:38:55.000Z","dependencies_parsed_at":"2025-02-05T09:26:25.399Z","dependency_job_id":"f5ea3b94-d28b-4266-84a2-38384b906942","html_url":"https://github.com/RauliL/pakertaja","commit_stats":null,"previous_names":[],"tags_count":16,"template":false,"template_full_name":null,"purl":"pkg:github/RauliL/pakertaja","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RauliL%2Fpakertaja","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RauliL%2Fpakertaja/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RauliL%2Fpakertaja/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RauliL%2Fpakertaja/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RauliL","download_url":"https://codeload.github.com/RauliL/pakertaja/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RauliL%2Fpakertaja/sbom","scorecard":{"id":118259,"data":{"date":"2025-08-11","repo":{"name":"github.com/RauliL/pakertaja","commit":"f92ae87a77ac314075ccfb0b4a4a2328c042e9d2"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.6,"checks":[{"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":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","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":"Code-Review","score":0,"reason":"Found 0/28 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":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/test.yml:1","Info: no jobLevel write permissions found"],"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":"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":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:19: update your workflow using https://app.stepsecurity.io/secureworkflow/RauliL/pakertaja/test.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:21: update your workflow using https://app.stepsecurity.io/secureworkflow/RauliL/pakertaja/test.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/test.yml:33: update your workflow using https://app.stepsecurity.io/secureworkflow/RauliL/pakertaja/test.yml/master?enable=pin","Info:   0 out of   2 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   1 third-party GitHubAction dependencies pinned"],"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":"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":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 2 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":1,"reason":"9 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-968p-4wvh-cqc8","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-67mh-4wv8-2f99","Warn: Project is vulnerable to: GHSA-x574-m823-4x7w","Warn: Project is vulnerable to: GHSA-4r4m-qw57-chr8","Warn: Project is vulnerable to: GHSA-xcj6-pq6g-qj4x","Warn: Project is vulnerable to: GHSA-356w-63v5-8wf4","Warn: Project is vulnerable to: GHSA-859w-5945-r5v3","Warn: Project is vulnerable to: GHSA-9crc-q9x8-hgqq"],"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-16T01:55:34.916Z","repository_id":12836787,"created_at":"2025-08-16T01:55:34.917Z","updated_at":"2025-08-16T01:55:34.917Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274152765,"owners_count":25231293,"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-08T02:00:09.813Z","response_time":121,"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":["dom","html","html-elements","javascript"],"created_at":"2024-11-15T23:17:51.368Z","updated_at":"2025-09-08T07:40:36.086Z","avatar_url":"https://github.com/RauliL.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Pakertaja JavaScript library [![github-url][github-image]][github-url] [![coveralls][coveralls-image]][coveralls-url] [![npm][npm-image]][npm-url]\n\n[github-image]: https://github.com/RauliL/pakertaja/actions/workflows/test.yml/badge.svg\n[github-url]: https://github.com/RauliL/pakertaja/actions/workflows/test.yml\n[coveralls-image]: https://coveralls.io/repos/github/RauliL/pakertaja/badge.svg\n[coveralls-url]: https://coveralls.io/github/RauliL/pakertaja\n[npm-image]: https://img.shields.io/npm/v/pakertaja.svg\n[npm-url]: https://npmjs.org/package/pakertaja\n\nPakertaja is a minimal JavaScript library for constructing DOM elements.\n\n## Example\n\n```JavaScript\nimport p from 'pakertaja';\n\nconst renderProduct = (title, description) =\u003e p.div(\n  {\n    class: 'product',\n    style: {\n      background: 'black',\n      color: 'white'\n    }\n  },\n\n  p.h1(title),\n\n  p.p(description),\n\n  p.form(\n    p.label({ for: 'quantity' }, 'Quantity: '),\n    p.input({ type: 'number', id: 'quantity', min: 10 }),\n    p.button(\n      'Add to cart',\n      {\n        type: 'submit',\n        onclick(ev) {\n          ev.preventDefault();\n          alert(`Added ${document.getElementById('quantity').value} products into cart.`);\n        }\n      }\n    )\n  )\n);\n\np.append(\n  document.body,\n  renderProduct(\n    'Battlefield Earth DVDs',\n    'Critically acclaimed as one of the best movies ever made.'\n  )\n);\n```\n\n## API\n\n### p( tagName[, ...args ] )\n\nConstructs and returns HTML element of given `tagName`, such as `div`, `h1` and\nso on. Optional arguments might consist from other HTML elements which will be\ninserted as child elements of the created parent element, text content or\nobjects which contain HTML attributes for the created element.\n\nShortcuts for most HTML5 elements exist for this function, which allows to\ncreate HTML elements of certain type more conveniently. These shortcuts are:\n`html`, `head`, `title`, `base`, `link`, `meta`,\n`style`, `script`, `noscript`, `body`, `section`, `nav`, `article`, `aside`,\n`h1`, `h2`, `h3`, `h4`, `h5`, `h6`, `header`, `footer`, `address`, `p`, `hr`,\n`br`, `pre`, `dialog`, `blockquote`, `ol`, `ul`, `li`, `dl`, `dt`, `dd`, `a`,\n`q`, `cite`, `em`, `strong`, `small`, `mark`, `dfn`, `abbr`, `time`, `progress`,\n`meter`, `code`, `var`, `samp`, `kbd`, `sub`, `sup`, `span`, `i`, `b`, `bdo`,\n`ruby`, `rt`, `rp`, `ins`, `del`, `figure`, `img`, `iframe`, `embed`, `object`,\n`param`, `video`, `audio`, `source`, `canvas`, `map`, `area`, `table`,\n`caption`, `colgroup`, `col`, `tbody`, `thead`, `tfoot`, `tr`, `td`, `th`,\n`form`, `fieldset`, `label`, `input`, `button`, `select`, `datalist`,\n`optgroup`, `option`, `textarea`, `output`, `details`, `command`, `bb`, `menu`,\n`legend` and `div`.\n\nText nodes can also be created with an shortcut function called `text` and\ndocument fragments with `fragment`.\n\n### p.append( root[, ...children ] )\n\nInserts given child elements to the end of given root element. Child elements\nmight consist from other HTML elements, strings or function callbacks which\nreturn strings.\n\n### p.prepend( root[, ...children ] )\n\nInserts given child elements to the beginning of given root element. Child\nelements might consist from other HTML elements, strings or function callbacks\nwhich return strings.\n\n### p.escape( input )\n\nEscapes HTML entities from given string input and returns result.\n\n## JSX\n\nWith [TypeScript] you can also use Pakertaja with [JSX] by adding following\nlines to `tsconfig.json` file:\n\n[TypeScript]: https://www.typescriptlang.org\n[JSX]: https://en.wikipedia.org/wiki/JSX_(JavaScript)\n\n```json\n{\n  \"compilerOptions\": {\n    \"jsxFactory\": \"p\",\n    \"jsxFragmentFactory\": \"p.fragment\"\n  }\n}\n```\n\n### Example\n\n```TypeScript\nimport p from 'pakertaja';\n\nconst onClick = (ev: Event) =\u003e {\n  const quantity = (document.getElementById('quantity') as HTMLInputElement).value;\n\n  ev.preventDefault();\n  alert(`Added ${quantity} products into cart.`);\n}\n\nconst renderProduct = (title: string, description: string): HTMLDivElement =\u003e (\n  \u003cdiv class=\"product\" style={{ background: 'black', color: 'white' }}\u003e\n    \u003ch1\u003e{title}\u003c/h1\u003e\n    \u003cp\u003e{description}\u003c/p\u003e\n    \u003cform\u003e\n      \u003clabel for=\"quantity\"\u003eQuantity:\u003c/label\u003e\n      \u003cinput type=\"number\" id=\"quantity\" min={10} /\u003e\n      \u003cbutton type=\"submit\" onclick={onClick}\u003e\n        Add to cart\n      \u003c/button\u003e\n    \u003c/form\u003e\n  \u003c/div\u003e\n);\n\np.append(\n  document.body,\n  renderProduct(\n    'Battlefield Earth DVDs',\n    'Critically acclaimed as one of the best movies ever made.'\n  )\n);\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fraulil%2Fpakertaja","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fraulil%2Fpakertaja","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fraulil%2Fpakertaja/lists"}