{"id":20513952,"url":"https://github.com/webreflection/introspected","last_synced_at":"2026-03-11T06:31:34.832Z","repository":{"id":57275446,"uuid":"91182854","full_name":"WebReflection/introspected","owner":"WebReflection","description":"Introspection for serializable arrays and JSON friendly objects.","archived":false,"fork":false,"pushed_at":"2018-07-03T18:02:08.000Z","size":51,"stargazers_count":82,"open_issues_count":3,"forks_count":5,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-03-27T14:11:36.580Z","etag":null,"topics":["deep","introspection","json","notifications","proxy","reactive-programming","serializable-objects","trap"],"latest_commit_sha":null,"homepage":"","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/WebReflection.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-05-13T15:13:58.000Z","updated_at":"2024-12-01T19:53:30.000Z","dependencies_parsed_at":"2022-09-15T19:10:15.606Z","dependency_job_id":null,"html_url":"https://github.com/WebReflection/introspected","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WebReflection%2Fintrospected","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WebReflection%2Fintrospected/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WebReflection%2Fintrospected/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WebReflection%2Fintrospected/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/WebReflection","download_url":"https://codeload.github.com/WebReflection/introspected/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248799955,"owners_count":21163404,"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":["deep","introspection","json","notifications","proxy","reactive-programming","serializable-objects","trap"],"created_at":"2024-11-15T21:14:02.192Z","updated_at":"2026-03-11T06:31:34.172Z","avatar_url":"https://github.com/WebReflection.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Introspected\n\n[![Build Status](https://travis-ci.org/WebReflection/introspected.svg?branch=master)](https://travis-ci.org/WebReflection/introspected) [![Coverage Status](https://coveralls.io/repos/github/WebReflection/introspected/badge.svg?branch=master)](https://coveralls.io/github/WebReflection/introspected?branch=master) [![donate](https://img.shields.io/badge/$-donate-ff69b4.svg?maxAge=2592000\u0026style=flat)](https://github.com/WebReflection/donate)\n\n[Medium presentation post](https://medium.com/@WebReflection/introspected-js-objects-without-secrets-55cf0bd3dccc)\n- - -\n\nIf you'd like to be notified about any possible change that could happen to a JSON compatible model / data / object / array / structure,\nincluding the possibility to retrieve the exact full path of the object that changed and eventually walk through it,\nyou've reached your destination.\n\n```js\nconst data = Introspected(\n  // any object or JSON compatible structure\n  // even with nested properties, objects, arrays\n  JSON.parse('{}'),\n  (root, path) =\u003e {\n    // the root object that changed\n    console.log(root);\n    // the path that just changed\n    console.log(path);\n  }\n);\n\n// now try the following in console\ndata.a.b.c.d.e.f.g = 'whatever';\ndata.array.value = [1, 2, 3];\ndata.array.value.push(4);\n// see all notifications about all changes 🎉\n\nJSON.stringify(data);\n// {\"a\":{\"b\":{\"c\":{\"d\":{\"e\":{\"f\":{\"g\":\"whatever\"}}}}}},\"array\":{\"value\":[1,2,3,4]}}\n```\n\n\n# API\n\n  * `Introspected(objectOrArray[, callback])` create a new `Introspected` object capable of having infinite depth without ever throwing errors\n  * `Introspected.observe(objectOrArray, callback)` crate a `Introspected` with a notifier per each change, or set a notifier per each change to an existent `Introspected` object\n  * `Introspected.pathValue(objectOrArray, path)` walk through an object via a provided path. A `path` is an `Array` of properties, it is usually the one received through the notifier whenever a `Introspected` object is **observed**.\n\n\n# Compatibility\n\nAny spec compliant ES2015 JavaScript engine.\n\n\u003csup\u003e(that means native `WeakMap`, `Proxy` and `Symbol.toPrimitive` too)\u003c/sup\u003e\n\n[Live test page](https://webreflection.github.io/introspected/)\n\n**Working:** NodeJS 6+, Chrome, Safari, GNOME Web, Edge, Firefox, Samsung Internet (Chrome 51)\n\n**Not there yet:** UC Browser (WebKit 534)\n\n\n## ISC License\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwebreflection%2Fintrospected","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwebreflection%2Fintrospected","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwebreflection%2Fintrospected/lists"}