Index: third_party/pkg/angular/lib/utils.dart |
diff --git a/third_party/pkg/angular/lib/utils.dart b/third_party/pkg/angular/lib/utils.dart |
index 1a476b7373de2f804f18484809942ceb77fde4a4..85762086bc925276d2d7b4a1b844382f83ea6ec4 100644 |
--- a/third_party/pkg/angular/lib/utils.dart |
+++ b/third_party/pkg/angular/lib/utils.dart |
@@ -118,3 +118,10 @@ final Set<String> RESERVED_WORDS = new Set<String>.from(const [ |
"while", |
"with" |
]); |
+ |
+/// Returns true iff o is [double.NAN]. |
+/// In particular, returns false if o is null. |
+bool isNaN(Object o) => o is num && o.isNaN; |
+ |
+/// Returns true iff o1 == o2 or both are [double.NAN]. |
+bool eqOrNaN(Object o1, Object o2) => o1 == o2 || (isNaN(o1) && isNaN(o2)); |