Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(63)

Unified Diff: third_party/pkg/angular/lib/utils.dart

Issue 257423008: Update all Angular libs (run update_all.sh). (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/pkg/angular/lib/transformer.dart ('k') | third_party/pkg/angular/package.json » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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));
« no previous file with comments | « third_party/pkg/angular/lib/transformer.dart ('k') | third_party/pkg/angular/package.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698