Lib utils
isCollection
Check if the given value is a datx collection instance.
isCollection(obj: any): boolean;
isModel
Check if the given value is a datx model instance.
isModel(obj: any): boolean;
commitModel
commit the current state of the model. This will reset the dirty state of all the model attributes to false.
commitModel(model: PureModel): void;
revertModel
This will revert the model state to the last commit.
revertModel(model: PureModel): void;
isAttributeDirty
Check if a specific model key is dirty.
isAttributeDirty<T extends PureModel>(model: T, key: keyof T): boolean;