{"id":16288674,"url":"https://github.com/matronator/view-sync","last_synced_at":"2026-03-05T01:34:06.744Z","repository":{"id":248177993,"uuid":"825943153","full_name":"matronator/view-sync","owner":"matronator","description":"Lightweight alternative to Alpine.js' `x-model` attribute, that is CSP friendly (no 'unsafe-eval' needed).","archived":false,"fork":false,"pushed_at":"2026-03-03T09:11:50.000Z","size":2377,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-03-03T12:51:26.818Z","etag":null,"topics":["alpine","alpinejs","csp-friendly","data-attributes","data-sync","html-input","html5-framework","input-sync","inputs","lightweight","lightweight-framework","lightweight-javascript-library","sync-data","sync-inputs","typescript-library","x-model"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/matronator.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE.md","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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":["matronator"],"patreon":"matronator","open_collective":null,"ko_fi":"matronator","tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":["https://www.paypal.me/matronator","https://www.blockchain.com/btc/address/35VRpVQaqFWjUCnVRpGineShz76QyYgSVg"]}},"created_at":"2024-07-08T20:02:19.000Z","updated_at":"2026-03-03T09:11:50.000Z","dependencies_parsed_at":"2024-07-12T22:28:14.069Z","dependency_job_id":"48496b3a-3972-4aaa-bb2f-1379f474e895","html_url":"https://github.com/matronator/view-sync","commit_stats":null,"previous_names":["matronator/view-sync"],"tags_count":2,"template":false,"template_full_name":"matronator/vite-ts-lib-starter","purl":"pkg:github/matronator/view-sync","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matronator%2Fview-sync","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matronator%2Fview-sync/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matronator%2Fview-sync/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matronator%2Fview-sync/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/matronator","download_url":"https://codeload.github.com/matronator/view-sync/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matronator%2Fview-sync/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30104560,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-05T01:06:53.091Z","status":"ssl_error","status_checked_at":"2026-03-05T01:02:35.679Z","response_time":59,"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":["alpine","alpinejs","csp-friendly","data-attributes","data-sync","html-input","html5-framework","input-sync","inputs","lightweight","lightweight-framework","lightweight-javascript-library","sync-data","sync-inputs","typescript-library","x-model"],"created_at":"2024-10-10T19:49:04.180Z","updated_at":"2026-03-05T01:34:06.699Z","avatar_url":"https://github.com/matronator.png","language":"TypeScript","readme":"# view-sync\n\n![View Sync logo](https://raw.githubusercontent.com/matronator/view-sync/main/.github/logo.png)\n\n![NPM Version](https://img.shields.io/npm/v/view-sync)\n![NPM Downloads](https://img.shields.io/npm/dw/view-sync)\n![npm TypeScript version](https://img.shields.io/npm/dependency-version/view-sync/dev/typescript)\n![Tree shaking](https://badgen.net/bundlephobia/tree-shaking/view-sync)\n![Dependencies](https://badgen.net/bundlephobia/dependency-count/view-sync)\n![npm package minimized gzipped size](https://img.shields.io/bundlejs/size/view-sync)\n![Commits](https://badgen.net/github/commits/matronator/view-sync)\n![Issues](https://img.shields.io/github/issues/matronator/view-sync.svg)\n![License](https://img.shields.io/github/license/matronator/view-sync.svg)\n\u003ca href=\"https://github.com/matronator\"\u003e![Follow](https://img.shields.io/github/followers/matronator.svg?style=social\u0026label=Follow\u0026maxAge=2592000)\u003c/a\u003e\n\u003ca href=\"https://github.com/sponsors/matronator/\"\u003e![GitHub Sponsors](https://img.shields.io/github/sponsors/matronator)\u003c/a\u003e\n\nLightweight alternative to Alpine.js' `x-model` attribute, that is CSP friendly (no 'unsafe-eval' needed).\n\n## Installation\n\n### Using a package manager\n\nInstall using your preferred package manager:\n\n#### NPM:\n\n```\nnpm i view-sync\n```\n\n#### Bun:\n\n```\nbun i view-sync\n```\n\n#### PNPM:\n\n```\npnpm i view-sync\n```\n\n#### Yarn:\n\n```\nyarn add view-sync\n```\n\nAnd then import it like this:\n\n```js\nimport { ViewSync } from 'view-sync';\n```\n\n### Using a CDN\n\n#### With a `\u003cscript\u003e` tag\n\n```html\n\u003cscript src=\"https://cdn.jsdelivr.net/npm/view-sync/dist/view-sync.iife.min.js\"\u003e\u003c/script\u003e\n\u003cscript\u003e\n    ViewSync.Init();\n\u003c/script\u003e\n```\n\n#### With a `\u003cscript type=\"module\"\u003e` tag using `import`\n\n```html\n\u003cscript type=\"module\"\u003e\n    import viewsync from https://cdn.jsdelivr.net/npm/view-sync/+esm\n\u003c/script\u003e\n```\n\n## Usage\n\nHTML:\n\n```html\n\u003c!-- Initialize view-sync and set initial value to \"world\" --\u003e\n\u003cdiv id=\"app\" data-sync-init=\"hello\" data-sync-value=\"world\"\u003e\n    \u003c!-- Value of these will be updated with value of `hello` in sync with each other --\u003e\n    \u003cinput type=\"text\" data-sync=\"hello\"\u003e\n    \u003ctextarea data-sync=\"hello\"\u003e\u003c/textarea\u003e\n\n    \u003c!-- Text content of this will be updated with value of `hello` --\u003e\n    \u003cspan data-sync-text=\"hello\"\u003e\u003c/span\u003e\n\n    \u003c!-- This will be hidden if value of `hello` is falsy --\u003e\n    \u003cdiv data-sync-state=\"hello\"\u003e\n        I will be hidden if `hello` is falsy\n    \u003c/div\u003e\n\u003c/div\u003e\n```\n\nJavaScript/TypeScript:\n\n```ts\nimport { ViewSync } from 'view-sync';\nViewSync.Init();\n```\n","funding_links":["https://github.com/sponsors/matronator","https://patreon.com/matronator","https://ko-fi.com/matronator","https://www.paypal.me/matronator","https://www.blockchain.com/btc/address/35VRpVQaqFWjUCnVRpGineShz76QyYgSVg","https://github.com/sponsors/matronator/"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmatronator%2Fview-sync","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmatronator%2Fview-sync","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmatronator%2Fview-sync/lists"}