{"id":21094101,"url":"https://github.com/archakov06/smit","last_synced_at":"2025-12-29T15:37:55.406Z","repository":{"id":57364164,"uuid":"206954072","full_name":"Archakov06/smit","owner":"Archakov06","description":"😎 Tiny library tracking changes in the LocalStorage","archived":false,"fork":false,"pushed_at":"2019-09-13T08:56:16.000Z","size":7,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-21T01:41:36.683Z","etag":null,"topics":["localstorage","smit","storage","tiny","tracking"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/Archakov06.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":"2019-09-07T10:46:47.000Z","updated_at":"2023-09-11T15:39:29.000Z","dependencies_parsed_at":"2022-08-29T11:01:39.779Z","dependency_job_id":null,"html_url":"https://github.com/Archakov06/smit","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Archakov06%2Fsmit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Archakov06%2Fsmit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Archakov06%2Fsmit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Archakov06%2Fsmit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Archakov06","download_url":"https://codeload.github.com/Archakov06/smit/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243538139,"owners_count":20307104,"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":["localstorage","smit","storage","tiny","tracking"],"created_at":"2024-11-19T22:16:16.016Z","updated_at":"2025-12-29T15:37:55.333Z","avatar_url":"https://github.com/Archakov06.png","language":"JavaScript","readme":"# Smit\n\nIs a tiny library 🔥~270 (gziped) byte localStorage emitter. Smit has no dependencies, supports all browsers and IE9+.\n\n## Install\n\n```\nnpm install smit\n```\n\nor\n\n```\nyarn add smit\n```\n\nIf you are in a CommonJS environment (eg Node), then you will need to add .default to your import:\n\n```js\n// ES6\nimport smit from 'smit';\n\n// CommonJS\nvar smit = require('smit').default;\n\n// UMD\n\u003cscript src=\"https://unpkg.com/smit/dist/smit.umd.js\"\u003e\u003c/script\u003e\n\n// Just one function (IIFE)\n\u003cscript src=\"https://unpkg.com/smit/dist/smit.iife.js\"\u003e\u003c/script\u003e\n```\n\n## Usage\n\n```js\nimport smit from 'smit';\n\nconst storage = smit();\n\n// Callback called when a key \"title\" is updated in localStorage\nstorage.on('title', title =\u003e console.log('title updated', title));\n\n// Listen of many keys in localStorage\nstorage.on('foo', value =\u003e console.log('foo', value)).on('bar', value =\u003e console.log('bar', value));\n\n// Remove listener\nstorage.off('foo');\n\n// Remove all listeners\nstorage.off();\n\n// destroy the smit\nstorage.destroy();\n```\n\n## Examples\n\nIf you want to check how this smit works, open any of the following demos in two tabs.\n\n### Chat\n\n**VanillaJS:** [Source](https://codesandbox.io/s/thirsty-gagarin-2dnp9) | [Demo](https://2dnp9.csb.app/)\n\u003cbr\u003e\n**VueJS:** [Source](https://codesandbox.io/s/vue-template-f17f6) | [Demo](https://f17f6.csb.app/)\n\u003cbr\u003e\n**ReactJS:** [Source](https://codesandbox.io/s/happy-mclean-umjel) | [Demo](https://umjel.csb.app/)\n\n### Audio\n\n**VanillaJS:** [Source](https://trycode.pw/c/J0ERM) | [Demo](https://trycode.pw/c/J0ERM.html)\n\n## Motivation\n\n...\n\n## How it works?\n\n...\n\n## License\n\n[MIT License](https://opensource.org/licenses/MIT) © [Archakov Dennis](https://archakov.im/about)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farchakov06%2Fsmit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farchakov06%2Fsmit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farchakov06%2Fsmit/lists"}