{"id":21076118,"url":"https://github.com/shaack/svjs-observe","last_synced_at":"2026-04-21T20:03:17.096Z","repository":{"id":57375762,"uuid":"112331955","full_name":"shaack/svjs-observe","owner":"shaack","description":"Observe properties, Arrays, Sets and Maps of an Object. Can also intercept function calls.","archived":false,"fork":false,"pushed_at":"2018-05-10T22:55:57.000Z","size":34,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-08T10:51:58.120Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/shaack.png","metadata":{"files":{"readme":"README.md","changelog":null,"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":"2017-11-28T12:23:11.000Z","updated_at":"2018-05-10T22:55:58.000Z","dependencies_parsed_at":"2022-09-14T20:51:13.347Z","dependency_job_id":null,"html_url":"https://github.com/shaack/svjs-observe","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/shaack%2Fsvjs-observe","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shaack%2Fsvjs-observe/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shaack%2Fsvjs-observe/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shaack%2Fsvjs-observe/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shaack","download_url":"https://codeload.github.com/shaack/svjs-observe/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243521247,"owners_count":20304184,"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":[],"created_at":"2024-11-19T19:26:46.967Z","updated_at":"2025-12-28T20:53:54.164Z","avatar_url":"https://github.com/shaack.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# svjs-observe\n\nAn ES6 Module to observe properties (simple properties, Arrays, Sets and Maps) \nof an Object. Can also intercept function calls.\n\nObserving means to call a callback-function every value change of an Object property.\n\n## Methods\n\n### Observe.property(object, propertyName, callback)\n\nObserve properties (attributes) of an object. Works also with Arrays, Maps and Sets. \nThe parameter `propertyName` can be an array of names to observe multiple properties.\n\n#### callback params\n\n`{ propertyName: propertyName, oldValue: oldValue, newValue: newValue }`\n\n#### Example\n\n``` JavaScript\nObserve.property(model, [\"property1\",\"property2\"], (params) =\u003e {\n    console.log(\"property changed\", params.propertyName);\n    console.log(\"oldValue\", params.oldValue);\n    console.log(\"newValue\", params.newValue);\n})\n```\n\n### Observe.preFunction(object, functionName, callback)\n\nIntercept a function call, before the function is executed. Can manipulate\narguments in the callback.\n\n#### callback params\n\n`{functionName: functionName, arguments: functionArguments}`\n\n### Observe.postFunction(object, functionName, callback)\n\nIntercept a function call, after the function is executed. Can manipulate\nreturnValue in callback. \n\n#### callback params\n\n`{functionName: functionName, arguments: functionArguments, returnValue: returnValue}`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshaack%2Fsvjs-observe","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshaack%2Fsvjs-observe","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshaack%2Fsvjs-observe/lists"}