{"id":25707715,"url":"https://github.com/jhsware/isomorphic-state-manager","last_synced_at":"2026-06-14T08:31:26.659Z","repository":{"id":57278143,"uuid":"56382268","full_name":"jhsware/isomorphic-state-manager","owner":"jhsware","description":"Manage state with a state machine similar to React.setState behavior but decoupled from components","archived":false,"fork":false,"pushed_at":"2016-09-22T11:20:54.000Z","size":10,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-05-14T09:14:12.312Z","etag":null,"topics":[],"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/jhsware.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":"2016-04-16T12:23:46.000Z","updated_at":"2016-05-28T09:50:09.000Z","dependencies_parsed_at":"2022-09-18T14:31:58.190Z","dependency_job_id":null,"html_url":"https://github.com/jhsware/isomorphic-state-manager","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jhsware/isomorphic-state-manager","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jhsware%2Fisomorphic-state-manager","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jhsware%2Fisomorphic-state-manager/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jhsware%2Fisomorphic-state-manager/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jhsware%2Fisomorphic-state-manager/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jhsware","download_url":"https://codeload.github.com/jhsware/isomorphic-state-manager/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jhsware%2Fisomorphic-state-manager/sbom","scorecard":{"id":519157,"data":{"date":"2025-08-11","repo":{"name":"github.com/jhsware/isomorphic-state-manager","commit":"9a92c169876779e51002fa2658064356302443da"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.6,"checks":[{"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/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"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/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Code-Review","score":0,"reason":"Found 0/13 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/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"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/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"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/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"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/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"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/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"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/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"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/f6ed084d17c9236477efd66e5b258b9d4cc7b389/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/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"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/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"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/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":0,"reason":"license file not detected","details":["Warn: project does not have a license file"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/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/f6ed084d17c9236477efd66e5b258b9d4cc7b389/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/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}}]},"last_synced_at":"2025-08-20T02:32:32.220Z","repository_id":57278143,"created_at":"2025-08-20T02:32:32.220Z","updated_at":"2025-08-20T02:32:32.220Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34315072,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-14T02:00:07.365Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":"2025-02-25T08:38:37.981Z","updated_at":"2026-06-14T08:31:26.634Z","avatar_url":"https://github.com/jhsware.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Isomorphic State Manager\n\nCreate a state machine that keeps your state in named stores. Supports hydration and rehydration to allow server-side rendered single page app to retain state without requiring separate api-calls during first render.\n\nEach update increments a version counter providing a simple check of data integrity.\n\nExample of usage:\n\n    var StateManager = require('isomorphic-state-manager').StateManager\n    \n    var stateManager = new StateManager(Store)\n    \n    var sessionStore = stateManager.storeFor('Session')\n    \n    function callback() {\n        var currentState = sessionStore.getState()\n        console.log(currentState)\n    }\n    \n    sessionStore.subscribe(callback) // Don't need a thisArg for the plain function used here as callback\n    \n    sessionStore.update({userName: \"Sebastian\"})\n    \n    /*\n        The callback is automatically called on update and outputs the state:\n        \n        {\n            userName: \"Sebastian\",\n            __version: 1\n        }\n    */\n\n## API Reference\n\n### StateManager ###\n\n    var stateManager = new StateManager( Store )\n\n=\u003e returns a new StateManager instance\n\n*Store* -- the store type you want to use, currently only one available: \n\n    var Store = require('isomorphic-state-manager').Store\n\nNote: You pass the prorotype, not an instance of Store\n\n##### .stateFor( storeName ) \n\n=\u003e returns StoreController\n\n_storeName_ -- the name of the store you want to access. If the store doesn't exist it will be created\n\n##### .hydrate()\n\n=\u003e returns a dictionary object containing all stores and current state. Keys correspond to store name\n\n##### .rehydrate( data )\n\n=\u003e returns undefined\n\n*data* -- a dictionary object that corresponds to current state of store. Keys correspond to store name\n\n### StoreController ###\n\n    var sessionStore = stateManager.stateFor('Session')\n\n##### .getState()\n\n=\u003e returns a dictionary object representing the current state of the store\n\n##### .default( data )\n\n=\u003e returns this StoreController (allowing chaining)\n\n*data* -- a dictionary object with the default state. The store is updated for all properties of the dictionary that aren't available in current state. Implementation does a .hasOwnProperty() test.\n\n##### .update( data )\n\n=\u003e returns this StoreController (allowing chaining)\n\n*data* -- a dictionary object that updates current state by shallow merge. Passed object overwrites existing properties\n\n##### .replace( data )\n\n=\u003e returns this StoreController (allowing chaining)\n\n*data* -- a dictionary object replacing current state entirely\n\n##### .subscribe( callback, thisArg )\n\n=\u003e returns current state (convenience, allowing us to skip an additional .getState())\n\n*callback* -- a function to call (without params) when the store has been updated\n\n*thisArg* -- sets this when invoking the callback\n\n##### .unsubscribe( callback, thisArg )\n\n=\u003e returns undefined\n\n*callback* -- the function callback we want to remove (same as used for .subscribe)\n\n*thisArg* -- thisArg of the callback we want to remove (same as used for .subscribe)\n\n*NOTE:* You need to provide both callback and thisArg in order to unsubscribe properly when used with for example React\n\n### TODO ###\n\nDONE: add .replace\nDONE: change .initialize to .defaults and always initialize\nDONE: implement .hydrate and .rehydrate to serialize and deserialize store\nTODO: Allow passing data when initializing store but only for rehydrating\n\n\nTODO: Allow deep copy\n\nTODO: How to create a test-driver?\n\n### DONE ###\nDONE: Create package and set up tests so we can start to see if this works.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjhsware%2Fisomorphic-state-manager","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjhsware%2Fisomorphic-state-manager","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjhsware%2Fisomorphic-state-manager/lists"}