{"id":15602495,"url":"https://github.com/fiveisprime/lookout","last_synced_at":"2025-03-29T13:24:38.698Z","repository":{"id":5495726,"uuid":"6694339","full_name":"fiveisprime/lookout","owner":"fiveisprime","description":"Create subscriptions for object property changes.","archived":false,"fork":false,"pushed_at":"2014-05-10T02:17:45.000Z","size":648,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-04T15:04:11.245Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://fiveisprime.github.io/lookout/docs/lookout.html","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/fiveisprime.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":"2012-11-14T20:24:16.000Z","updated_at":"2023-10-22T12:03:27.000Z","dependencies_parsed_at":"2022-07-07T19:08:36.868Z","dependency_job_id":null,"html_url":"https://github.com/fiveisprime/lookout","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fiveisprime%2Flookout","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fiveisprime%2Flookout/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fiveisprime%2Flookout/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fiveisprime%2Flookout/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fiveisprime","download_url":"https://codeload.github.com/fiveisprime/lookout/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246188684,"owners_count":20737746,"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-10-03T02:41:43.795Z","updated_at":"2025-03-29T13:24:38.678Z","avatar_url":"https://github.com/fiveisprime.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Lookout [![Build Status](https://secure.travis-ci.org/fiveisprime/lookout.svg?branch=master)](https://travis-ci.org/fiveisprime/lookout)\n\nCreate subscriptions for object property changes.\n\n## Getting Started\nDownload the [production version][min] or the [development version][max] or\ninstall using [bower](http://bower.io): `bower install lookout`.\n\n[min]: https://raw.github.com/fiveisprime/lookout/master/src/lookout.min.js\n[max]: https://raw.github.com/fiveisprime/lookout/master/src/lookout.js\n\nIn your web page:\n\n```js\nvar something = { name: 'something' };\n\n// Watch the object's properties using lookout.\nlookout(something, function() {\n  console.log('Something just changed');\n});\n\n// Unwatch the object's properties using disregard.\ndisregard(something);\n```\n\n## Browser support\n\nLookout does not support Internet Explorer 6 or 7. All other browsers and\nversions are supported.\n\n## Examples\nLookout allows you to subscribe to change notifications on an object for things\nlike validation and ensures that `this` is the object that changed:\n\n```js\nvar myObject = { id: 100, name: 'my object' };\n\nlookout(myObject, 'name', function() {\n  // this is the object that just changed.\n  if (this.name.length === 0) {\n    alert('Invalid name value!');\n  }\n});\n```\n\nThe notification callback also passes the name of the property that changed,\nthe old value, and the new value:\n\n```js\nvar myObject = { id: 100, name: 'my object' };\n\nlookout(myObject, function(prop, oldValue, newValue) {\n  console.log(prop + ' just changed from [' + oldValue + '] to [' + newValue + ']');\n});\n```\n\n## Release History\n* 2013/10/18 - v0.1.2 - Major rework of the build system and corrected `disregard` functionality.\n* 2012/11/27 - v0.1.1 - Bug fixes.\n* 2012/11/15 - v0.1.0 - Initial release.\n\n## License\nCopyright (c) 2014 Matt Hernandez\n\nPermission is hereby granted, free of charge, to any person\nobtaining a copy of this software and associated documentation\nfiles (the \"Software\"), to deal in the Software without\nrestriction, including without limitation the rights to use,\ncopy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the\nSoftware is furnished to do so, subject to the following\nconditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\nOF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\nNONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\nHOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\nWHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\nOTHER DEALINGS IN THE SOFTWARE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffiveisprime%2Flookout","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffiveisprime%2Flookout","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffiveisprime%2Flookout/lists"}