immutable-class
Advanced tools
Comparing version 0.6.41 to 0.6.42
@@ -0,1 +1,2 @@ | ||
export declare type DiffAction = 'create' | 'update' | 'delete'; | ||
export interface Nameable { | ||
@@ -27,2 +28,3 @@ name: string; | ||
toJSON(): DiffJS; | ||
getAction(): DiffAction; | ||
getName(): string; | ||
@@ -29,0 +31,0 @@ } |
@@ -44,2 +44,10 @@ "use strict"; | ||
}; | ||
Diff.prototype.getAction = function () { | ||
if (this.before) { | ||
return this.after ? 'update' : 'delete'; | ||
} | ||
else { | ||
return 'create'; | ||
} | ||
}; | ||
Diff.prototype.getName = function () { | ||
@@ -46,0 +54,0 @@ return this.before ? this.before.name : this.after.name; |
{ | ||
"name": "immutable-class", | ||
"version": "0.6.41", | ||
"version": "0.6.42", | ||
"description": "A template for creating immutable classes", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
88093
1825