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

Side by Side Diff: packages/js_util/lib/src/js_util_base.dart

Issue 2119523002: Added full js & js_util packages (Closed) Base URL: git@github.com:dart-lang/observatory_pub_packages.git@master
Patch Set: Created 4 years, 5 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 unified diff | Download patch
« no previous file with comments | « packages/js_util/lib/js_util.dart ('k') | packages/js_util/pubspec.yaml » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 @JS() 1 @JS()
2 library js_util.base; 2 library js_util.base;
3 3
4 import 'package:js/js.dart'; 4 import 'package:js/js.dart';
5 import 'package:quiver_iterables/iterables.dart'; 5 import 'package:quiver_iterables/iterables.dart';
6 6
7 // js_util library uses the technique described in 7 // js_util library uses the technique described in
8 // https://github.com/dart-lang/sdk/issues/25053 8 // https://github.com/dart-lang/sdk/issues/25053
9 // because dart2js compiler does not support [] operator. 9 // because dart2js compiler does not support [] operator.
10 10
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 for (final keyValuePair in zip([o.keys, o.values])) { 50 for (final keyValuePair in zip([o.keys, o.values])) {
51 setValue(newObj, keyValuePair[0], toJS(keyValuePair[1])); 51 setValue(newObj, keyValuePair[0], toJS(keyValuePair[1]));
52 } 52 }
53 return newObj; 53 return newObj;
54 } else if (o is List) { 54 } else if (o is List) {
55 return o.map((e) => toJS(e)).toList(); 55 return o.map((e) => toJS(e)).toList();
56 } else { 56 } else {
57 return o; 57 return o;
58 } 58 }
59 } 59 }
OLDNEW
« no previous file with comments | « packages/js_util/lib/js_util.dart ('k') | packages/js_util/pubspec.yaml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698