Skip to content
This repository has been archived by the owner on Nov 25, 2020. It is now read-only.

Commit

Permalink
feat(entity): Added .isDirty() method
Browse files Browse the repository at this point in the history
  • Loading branch information
RWOverdijk committed Dec 28, 2015
1 parent 46b499c commit e2bb595
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/entity.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,15 @@ export class Entity {
return this.__cleanValues === this.asJson(true);
}

/**
* Return if the entity is dirty.
*
* @return {boolean}
*/
isDirty() {
return !this.isClean();
}

/**
* Persist the changes made to this entity to the server.
*
Expand Down

0 comments on commit e2bb595

Please sign in to comment.