Chromium Code Reviews| Index: pkg/analysis_server/lib/src/protocol.dart |
| diff --git a/pkg/analysis_server/lib/src/protocol.dart b/pkg/analysis_server/lib/src/protocol.dart |
| index 7cdfa18de0c22eb00ea302288a470cda0cc29a96..1434073bf392068db86d2f91ca6eef1f782d6147 100644 |
| --- a/pkg/analysis_server/lib/src/protocol.dart |
| +++ b/pkg/analysis_server/lib/src/protocol.dart |
| @@ -185,6 +185,13 @@ class RequestDatum { |
| } |
| /** |
| + * Return `true` if the datum is a Map containing the given [key]. |
| + */ |
| + bool hasKey(String key) { |
| + return datum is Map<String, dynamic> && datum.containsKey(key); |
|
Paul Berry
2014/05/15 00:30:54
This means that if we receive a datum from the cli
danrubel
2014/05/15 11:48:44
Good suggestion. Done.
|
| + } |
| + |
| + /** |
| * Validate that the datum is a Map whose keys are strings, and call [f] on |
| * each key/value pair in the map. |
| */ |