| OLD | NEW |
| 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 /* This library defines a set of general javascript utilities for us | 5 /* This library defines a set of general javascript utilities for us |
| 6 * by the Dart runtime. | 6 * by the Dart runtime. |
| 7 */ | 7 */ |
| 8 | 8 |
| 9 var dart_utils = | 9 var dart_utils = |
| 10 typeof module != "undefined" && module.exports || {}; | 10 typeof module != "undefined" && module.exports || {}; |
| 11 | 11 |
| 12 (function (dart_utils) { | 12 (function (dart_utils) { |
| 13 'use strict'; | 13 'use strict'; |
| 14 | 14 |
| 15 const defineProperty = Object.defineProperty; | 15 const defineProperty = Object.defineProperty; |
| 16 const getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor; | 16 const getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor; |
| 17 const getOwnPropertyNames = Object.getOwnPropertyNames; | 17 const getOwnPropertyNames = Object.getOwnPropertyNames; |
| 18 const getOwnPropertySymbols = Object.getOwnPropertySymbols; | 18 const getOwnPropertySymbols = Object.getOwnPropertySymbols; |
| 19 | 19 |
| 20 const hasOwnProperty = Object.prototype.hasOwnProperty; | 20 const hasOwnProperty = Object.prototype.hasOwnProperty; |
| 21 | 21 |
| 22 const slice = [].slice; | |
| 23 | |
| 24 class StrongModeError extends Error { | 22 class StrongModeError extends Error { |
| 25 constructor(message) { | 23 constructor(message) { |
| 26 super(message); | 24 super(message); |
| 27 } | 25 } |
| 28 } | 26 } |
| 29 | 27 |
| 30 /** This error indicates a strong mode specific failure. | 28 /** This error indicates a strong mode specific failure. |
| 31 */ | 29 */ |
| 32 function throwStrongModeError(message) { | 30 function throwStrongModeError(message) { |
| 33 throw new StrongModeError(message); | 31 throw new StrongModeError(message); |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 126 } | 124 } |
| 127 if (hide != void 0) { | 125 if (hide != void 0) { |
| 128 var hideMap = new Set(hide); | 126 var hideMap = new Set(hide); |
| 129 show = show.filter((k) => !hideMap.has(k)); | 127 show = show.filter((k) => !hideMap.has(k)); |
| 130 } | 128 } |
| 131 return copyTheseProperties(to, from, show); | 129 return copyTheseProperties(to, from, show); |
| 132 } | 130 } |
| 133 dart_utils.export = export_; | 131 dart_utils.export = export_; |
| 134 | 132 |
| 135 })(dart_utils); | 133 })(dart_utils); |
| OLD | NEW |