{"id":16318005,"url":"https://github.com/workmanw/ember-did-change-attrs","last_synced_at":"2025-10-27T22:08:42.934Z","repository":{"id":66584416,"uuid":"109035718","full_name":"workmanw/ember-did-change-attrs","owner":"workmanw","description":null,"archived":false,"fork":false,"pushed_at":"2018-01-09T16:14:18.000Z","size":138,"stargazers_count":27,"open_issues_count":4,"forks_count":4,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-18T14:53:46.536Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/workmanw.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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":"2017-10-31T18:18:48.000Z","updated_at":"2022-03-25T08:32:21.000Z","dependencies_parsed_at":null,"dependency_job_id":"2d86edc3-b64f-4b9f-b321-ed423efdbea0","html_url":"https://github.com/workmanw/ember-did-change-attrs","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/workmanw%2Fember-did-change-attrs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/workmanw%2Fember-did-change-attrs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/workmanw%2Fember-did-change-attrs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/workmanw%2Fember-did-change-attrs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/workmanw","download_url":"https://codeload.github.com/workmanw/ember-did-change-attrs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245022582,"owners_count":20548563,"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-10T22:09:44.794Z","updated_at":"2025-10-27T22:08:42.827Z","avatar_url":"https://github.com/workmanw.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ember-did-change-attrs [![Build Status](https://travis-ci.org/workmanw/ember-did-change-attrs.svg?branch=master)](https://travis-ci.org/workmanw/ember-did-change-attrs)\n\nThis addon is a WIP rethink of [ember-diff-attrs](https://github.com/workmanw/ember-diff-attrs) which offered a decorator style approach to this problem.\n\nWith `ember-did-change-attrs` we're going to solve the same problem using mixins instead of functions. The aim is to offer a simpler API which covers attribute change use cases that previously might have been solved using the [now deprecated `didReceiveAttrs` and `didUpdateAttrs` arguments](https://github.com/emberjs/rfcs/pull/191).\n\nThis API is still experimental, suggestions for improvements are encouraged and very much appreciated.\n\n## Installation\n\n`ember install ember-did-change-attrs`\n\n## Usage\n\n```js\nimport DidChangeAttrs from 'ember-did-change-attrs';\n\nexport default Ember.Component.extend(DidChangeAttrs, {\n  didChangeAttrsConfig: {\n    attrs: ['email']\n  },\n\n  didChangeAttrs(changes) {\n    this._super(...arguments);\n\n    if(changes.email) {\n      let oldEmail = changes.email.previous,\n          newEmail = changes.email.current;\n      // Do stuff\n    }\n  }\n});\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fworkmanw%2Fember-did-change-attrs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fworkmanw%2Fember-did-change-attrs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fworkmanw%2Fember-did-change-attrs/lists"}