{"id":40506287,"url":"https://github.com/tomhodgins/jsts-dom","last_synced_at":"2026-01-20T19:36:33.877Z","repository":{"id":57286489,"uuid":"139305759","full_name":"tomhodgins/jsts-dom","owner":"tomhodgins","description":"Helper functions to work with JSTS files in the browser","archived":false,"fork":false,"pushed_at":"2018-07-02T05:30:32.000Z","size":10,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-09-28T06:56:01.931Z","etag":null,"topics":["html-templating","interpolated-templates","javascript","template-engine","template-literals","template-strings","templating"],"latest_commit_sha":null,"homepage":null,"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/tomhodgins.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":"2018-07-01T06:30:58.000Z","updated_at":"2023-04-11T15:23:28.000Z","dependencies_parsed_at":"2022-09-20T00:21:14.564Z","dependency_job_id":null,"html_url":"https://github.com/tomhodgins/jsts-dom","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/tomhodgins/jsts-dom","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomhodgins%2Fjsts-dom","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomhodgins%2Fjsts-dom/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomhodgins%2Fjsts-dom/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomhodgins%2Fjsts-dom/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tomhodgins","download_url":"https://codeload.github.com/tomhodgins/jsts-dom/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomhodgins%2Fjsts-dom/sbom","scorecard":{"id":892630,"data":{"date":"2025-08-18","repo":{"name":"github.com/tomhodgins/jsts-dom","commit":"bdd34ce1f6bf284705d7ae6415f1ce6903411750"},"scorecard":{"version":"v5.2.1-41-g40576783","commit":"40576783fda6698350fcbbeaea760ff827433034"},"score":3,"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/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#binary-artifacts"}},{"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/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#sast"}},{"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/40576783fda6698350fcbbeaea760ff827433034/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/40576783fda6698350fcbbeaea760ff827433034/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/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#packaging"}},{"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/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#token-permissions"}},{"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/40576783fda6698350fcbbeaea760ff827433034/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/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#maintained"}},{"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/40576783fda6698350fcbbeaea760ff827433034/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/40576783fda6698350fcbbeaea760ff827433034/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/40576783fda6698350fcbbeaea760ff827433034/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/40576783fda6698350fcbbeaea760ff827433034/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/40576783fda6698350fcbbeaea760ff827433034/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/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#branch-protection"}},{"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/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-24T12:26:54.852Z","repository_id":57286489,"created_at":"2025-08-24T12:26:54.852Z","updated_at":"2025-08-24T12:26:54.852Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28610776,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-20T18:56:40.769Z","status":"ssl_error","status_checked_at":"2026-01-20T18:54:26.653Z","response_time":117,"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":["html-templating","interpolated-templates","javascript","template-engine","template-literals","template-strings","templating"],"created_at":"2026-01-20T19:36:33.194Z","updated_at":"2026-01-20T19:36:33.862Z","avatar_url":"https://github.com/tomhodgins.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# jsts-dom\n\n**Helper functions for working with JSTS templates in the browser**\n\n## About\n\nA set of helper functions for reading JSTS templates from DOM nodes, processing, and outputting interpolated templates in other DOM nodes.\n\nBy using JavaScript Template Strings for templating content in the browser you can make use of any variables JavaScript knows about, make use of JavaScript's built-in logic for templating any other language you're working with, and even write plugins and mixins that help you extend your templates all in 100% vanilla JavaScript.\n\n## Usage\n\nThis plugin is provided in the following three formats:\n\n- [index.js](index.js) is a CommonJS module formatted for Node.js\n- [index.es.js](index.es.js) is a standard ES module\n- [index.browser.js](index.browser.js) is a script containing a named function\n\n### Installing from npm\n\n```\nnpm install jsts-dom\n```\n\n## Functions\n\n### Read\n\n```js\nread(selector)\n```\n\n- `selector` a string containing a CSS selector matching DOM nodes from which JSTS template(s) should be read\n\nUse `read()` to read JSTS template(s) from one or more DOM nodes in an HTML document by matching them with a CSS selector (or leave blank to use the default `[type=\"text/jsts\"]`). This function returns an array of strings containing JSTS templates to be interpolated.\n\n### Process\n\n```js\nprocess(strings, environment)\n```\n\n- `strings` a string or array of strings containing JSTS templates to be interpolated\n- `environment` an object containing any objects you wish to be available to the template during interpolation\n\nThis function accepts an array of JSTS templates and any JavaScript objects you wish to be made available to your JSTS template during its interpolation and sends them to be processed by the `jsts-engine` package. The return from this function is the return from processing the templates with the `jsts-engine` package, an array containing the final interpolated template as well as an `output` object which isn't used by the other functions in this plugin.\n\n### Render\n\n```js\nrender(strings, tag)\n```\n\n- `strings` a string or array of strings containing interpolated templates\n- `tag` a DOM node to populate\n\nThe `render()` function accepts strings to be written to a DOM node, and a DOM node to populate with content, and returns the DOM node after the content has been added.\n\n### Mount\n\n```js\nmount(selector, tag, environment)\n\n// equivalent to\nrender(process(read(selector), environment), tag)\n```\n\n- `selector` a string containing a CSS selector matching DOM nodes from which JSTS template(s) should be read\n- `tag` a DOM node to populate\n- `environment` an object containing any objects you wish to be available to the template during interpolation\n\nThis function is a `read`-`process`-`render` workflow expressed at a higher level, where you only supply the CSS selector matching the DOM nodes containing JSTS template(s) to be read, a tag to populated the result to, and any JS objects you want available to the template(s) during interpolation.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftomhodgins%2Fjsts-dom","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftomhodgins%2Fjsts-dom","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftomhodgins%2Fjsts-dom/lists"}