{"id":17983549,"url":"https://github.com/vvscode/object-chronicler","last_synced_at":"2026-02-14T05:34:27.803Z","repository":{"id":208910036,"uuid":"722746710","full_name":"vvscode/object-chronicler","owner":"vvscode","description":"Object usage observer","archived":false,"fork":false,"pushed_at":"2025-02-18T23:28:41.000Z","size":637,"stargazers_count":0,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-11T02:08:44.771Z","etag":null,"topics":["monitoring","observer","spy","testing"],"latest_commit_sha":null,"homepage":"https://vvscode.github.io/object-chronicler/","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/vvscode.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-11-23T21:13:51.000Z","updated_at":"2024-12-05T06:49:19.000Z","dependencies_parsed_at":"2023-11-24T00:20:46.933Z","dependency_job_id":"aa1dd836-6659-45a6-9370-ced53b02f142","html_url":"https://github.com/vvscode/object-chronicler","commit_stats":{"total_commits":23,"total_committers":1,"mean_commits":23.0,"dds":0.0,"last_synced_commit":"57e1c2c9ea7a3a16874e130867d592f3187459fd"},"previous_names":["vvscode/deep-observer"],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/vvscode/object-chronicler","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vvscode%2Fobject-chronicler","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vvscode%2Fobject-chronicler/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vvscode%2Fobject-chronicler/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vvscode%2Fobject-chronicler/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vvscode","download_url":"https://codeload.github.com/vvscode/object-chronicler/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vvscode%2Fobject-chronicler/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29438607,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-14T05:24:35.651Z","status":"ssl_error","status_checked_at":"2026-02-14T05:24:34.830Z","response_time":53,"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":["monitoring","observer","spy","testing"],"created_at":"2024-10-29T18:17:39.301Z","updated_at":"2026-02-14T05:34:27.788Z","avatar_url":"https://github.com/vvscode.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Object Chronicler\n\n[![npm version](https://badge.fury.io/js/object-chronicler.svg)](https://www.npmjs.com/package/object-chronicler)\n[![Deploy](https://github.com/vvscode/object-chronicler/workflows/build/badge.svg)](https://github.com/vvscode/object-chronicler/actions)\n[![Coverage Status](https://coveralls.io/repos/github/vvscode/object-chronicler/badge.svg?branch=master)](https://coveralls.io/github/vvscode/object-chronicler?branch=master)\n\nObject Chronicler empowers developers to gain unprecedented insights into the behavior of their JavaScript objects and functions. Acting as a meticulous observer, this utility allows you to effortlessly create spies that diligently record every interaction within your complex data structures.\n\n### Key Features\n\n- **Observation Made Easy:** Utilize createSpy to seamlessly spy on objects and functions, generating proxies with built-in history tracking.\n\n- **Detailed Histories:** `BasicHistory` provides a simple yet powerful implementation of the History interface, enabling the storage of detailed records about property accesses, method calls, and more.\n\n- **Flexible Testing:** Perfect for unit testing, debugging, and gaining a deeper understanding of your code's runtime behavior.\n\n#### Why Object Chronicler?\n\nObject Chronicler is your ally in navigating the intricacies of JavaScript objects and functions. Whether you're debugging, testing, or simply seeking a deeper understanding of your code's runtime behavior, this library empowers you to chronicle every interaction, ensuring you have the insights needed for confident and effective development.\n\n\u003e Explore new possibilities with Object Chronicler today!\n\n### Installation\n\n```bash\nnpm install object-chronicler\n```\n\n## Usage\n\n### createSpy\n\n`createSpy` is the main function for creating spies on objects or functions. It returns a proxied object with a history property to retrieve the recorded interactions.\n\n```ts\nimport { createSpy, BasicHistory } from 'object-chronicler';\n\nconst obj = {\n  method1: (x: unknown) =\u003e 'result1',\n  method2: (y: unknown) =\u003e 'result2',\n};\n\nconst history = new BasicHistory();\nconst spiedObj = createSpy(obj, history);\n\nconsole.log(spiedObj.method1(1)); // Output: 'result1'\nconsole.log(spiedObj.method2({ b: [] })); // Output: 'result2'\n\nconsole.log(history.getAll());\n````\n\n### BasicHistory\n\n`BasicHistory` is a simple implementation of the `History` interface. It records interactions in a key-value store.\n\n```ts\nimport { BasicHistory } from 'object-chronicler';\n\nconst history = new BasicHistory();\n\nhistory.put({ type: 'get', key: 'key1' });\nhistory.put({ type: 'set', key: 'key2', value: 'value2' });\n\nconsole.log(history.getAll());\n```\n\n### Contributing\n\nFeel free to contribute by opening issues or pull requests on [the GitHub repository](https://github.com/vvscode/object-chronicler).\n\n#### Keywords\n\nobject, chronicler, spy, testing, history, tracking\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvvscode%2Fobject-chronicler","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvvscode%2Fobject-chronicler","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvvscode%2Fobject-chronicler/lists"}