{"id":15412747,"url":"https://github.com/jeetiss/cross-storeon","last_synced_at":"2026-02-16T11:04:35.728Z","repository":{"id":37878769,"uuid":"216905618","full_name":"jeetiss/cross-storeon","owner":"jeetiss","description":null,"archived":false,"fork":false,"pushed_at":"2023-01-04T12:38:21.000Z","size":1349,"stargazers_count":3,"open_issues_count":22,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-10-04T08:48:38.383Z","etag":null,"topics":[],"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/jeetiss.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2019-10-22T20:39:09.000Z","updated_at":"2022-06-09T22:00:09.000Z","dependencies_parsed_at":"2023-02-02T12:32:07.913Z","dependency_job_id":null,"html_url":"https://github.com/jeetiss/cross-storeon","commit_stats":null,"previous_names":["jeetiss/storeon-crossstore"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/jeetiss/cross-storeon","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeetiss%2Fcross-storeon","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeetiss%2Fcross-storeon/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeetiss%2Fcross-storeon/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeetiss%2Fcross-storeon/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jeetiss","download_url":"https://codeload.github.com/jeetiss/cross-storeon/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeetiss%2Fcross-storeon/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29506343,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-16T09:05:14.864Z","status":"ssl_error","status_checked_at":"2026-02-16T08:55:59.364Z","response_time":115,"last_error":"SSL_read: 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":[],"created_at":"2024-10-01T16:54:15.479Z","updated_at":"2026-02-16T11:04:35.698Z","avatar_url":"https://github.com/jeetiss.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Cross Storeon\n\n\u003cimg src=\"https://storeon.github.io/storeon/logo.svg\" align=\"right\"\n     alt=\"Storeon logo by Anton Lovchikov\" width=\"140\"\u003e\n\nModule for [Storeon] to synchronize actions through different ways with filtering of events that need to be synchronized.\n\nIt size is 131 bytes (minified and gzipped) and uses [Size Limit] to control size.\n\n[Storeon]: https://github.com/storeon/storeon\n[Size Limit]: https://github.com/ai/size-limit\n\n\n## Installation\n\n```\nnpm install cross-storeon\n# or\nyarn add cross-storeon\n```\n\n## API\n\n```js\nimport crossstore from 'cross-storeon'\n\nconst crossTab = function ({ key, filter }) {\n  var ignoreDate = 0\n  var counter = 0\n\n  return crossstore({\n    key,\n    filter,\n    send: function (event) {\n      ignoreDate = Date.now() + '' + counter++\n      localStorage[key] = JSON.stringify([event, ignoreDate])\n    },\n\n    subscribe: function (cb) {\n      window.addEventListener('storage', function (event) {\n        if (event.key === key) {\n          var tip = JSON.parse(event.newValue)\n\n          if (ignoreDate !== tip[1]) {\n            cb(tip[0])\n          }\n        }\n      })\n    }\n  })\n}\n```\n\nFunction `crossstore` could have options:\n\n* __key__: key.\n* __filter__: callback function to filter actions to be synchronized. Should return `true` if need sync this action. Takes parameters of an event name and a data that is sent.\n* __send__: callback to send events to different stores\n* __subscribe__: callback to subscribe on events from different stores\n\n\n## LICENSE\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjeetiss%2Fcross-storeon","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjeetiss%2Fcross-storeon","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjeetiss%2Fcross-storeon/lists"}