{"id":25526021,"url":"https://github.com/userjhansen/get-js-var-deno","last_synced_at":"2026-05-13T20:34:12.142Z","repository":{"id":62422206,"uuid":"385075215","full_name":"UserJHansen/get-JS-var-deno","owner":"UserJHansen","description":"Fetch a Javascript variable from html or js string","archived":false,"fork":false,"pushed_at":"2021-07-12T03:47:17.000Z","size":6,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-18T15:02:40.928Z","etag":null,"topics":["deno","deno-module","denoland"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/UserJHansen.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-07-11T23:46:01.000Z","updated_at":"2021-07-12T03:46:27.000Z","dependencies_parsed_at":"2022-11-01T17:45:47.439Z","dependency_job_id":null,"html_url":"https://github.com/UserJHansen/get-JS-var-deno","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UserJHansen%2Fget-JS-var-deno","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UserJHansen%2Fget-JS-var-deno/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UserJHansen%2Fget-JS-var-deno/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UserJHansen%2Fget-JS-var-deno/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/UserJHansen","download_url":"https://codeload.github.com/UserJHansen/get-JS-var-deno/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239735263,"owners_count":19688262,"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","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":["deno","deno-module","denoland"],"created_at":"2025-02-19T21:15:55.420Z","updated_at":"2025-10-31T14:30:52.610Z","avatar_url":"https://github.com/UserJHansen.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Get JS variable Deno 🦕\n\nFetch a Javascript variable from html or js string **without** evaling the page\n\n# Setup\n\n```ts\nimport { FindVariable } from \"https://deno.land/x/get_js_var/mod.ts\";\n\n//\n// Code for Example.org withadded script tag that set the TargetVar variable\n//\nconst target = \"TargetVar\";\n\nconst html =\n  \"\u003c!doctype html\u003e\\n\u003chtml\u003e\\n\u003chead\u003e\\n    \u003ctitle\u003eExample Domain\u003c/title\u003e\\n\\n    \u003cmeta charset='utf-8' /\u003e\\n    \u003cmeta http-equiv='Content-type' content='text/html; charset=utf-8' /\u003e\\n    \u003cmeta name='viewport' content='width=device-width, initial-scale=1' /\u003e\\n    \u003cstyle type='text/css'\u003e\\n    body {\\n        background-color: #f0f0f2;\\n        margin: 0;\\n        padding: 0;\\n        font-family: -apple-system, system-ui, BlinkMacSystemFont, 'Segoe UI', 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;\\n        \\n    }\\n    div {\\n        width: 600px;\\n        margin: 5em auto;\\n        padding: 2em;\\n        background-color: #fdfdff;\\n        border-radius: 0.5em;\\n        box-shadow: 2px 3px 7px 2px rgba(0,0,0,0.02);\\n    }\\n    a:link, a:visited {\\n        color: #38488f;\\n        text-decoration: none;\\n    }\\n    @media (max-width: 700px) {\\n        div {\\n            margin: 0 auto;\\n            width: auto;\\n        }\\n    }\\n    \u003c/style\u003e\\n\t \u003cscript\u003e\\n\t \tvar TargetVar = 1\\n\t \u003c/script\u003e\\n\u003c/head\u003e\\n\\n\u003cbody\u003e\\n\u003cdiv\u003e\\n    \u003ch1\u003eExample Domain\u003c/h1\u003e\\n    \u003cp\u003eThis domain is for use in illustrative examples in documents. You may use this\\n    domain in literature without prior coordination or asking for permission.\u003c/p\u003e\\n    \u003cp\u003e\u003ca href='https://www.iana.org/domains/example'\u003eMore information...\u003c/a\u003e\u003c/p\u003e\\n\u003c/div\u003e\\n\u003c/body\u003e\\n\u003c/html\u003e\\n\";\n\nconst result = FindVariable(target, html);\n\nconsole.log(result);\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fuserjhansen%2Fget-js-var-deno","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fuserjhansen%2Fget-js-var-deno","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fuserjhansen%2Fget-js-var-deno/lists"}