| OLD | NEW |
| 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, 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 // The following methods are used to handle type information | 5 // The following methods are used to handle type information |
| 6 // | 6 // |
| 7 | 7 |
| 8 /** | 8 /** |
| 9 * @constructor | 9 * @constructor |
| 10 * @param {string} classkey | 10 * @param {string} classkey |
| (...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 262 */ | 262 */ |
| 263 function $cls(cls) { | 263 function $cls(cls) { |
| 264 return "cls:" + cls; | 264 return "cls:" + cls; |
| 265 } | 265 } |
| 266 | 266 |
| 267 /** | 267 /** |
| 268 * @param {*} o | 268 * @param {*} o |
| 269 * @return {boolean} | 269 * @return {boolean} |
| 270 */ | 270 */ |
| 271 function $isBool(o) { | 271 function $isBool(o) { |
| 272 return typeof o == 'boolean' || o instanceof Boolean; | 272 return typeof o == 'boolean'; |
| 273 } | 273 } |
| 274 | 274 |
| 275 /** | 275 /** |
| 276 * @param {*} o | 276 * @param {*} o |
| 277 * @return {boolean} | 277 * @return {boolean} |
| 278 */ | 278 */ |
| 279 function $isNum(o) { | 279 function $isNum(o) { |
| 280 return typeof o == 'number' || o instanceof Number; | 280 return typeof o == 'number'; |
| 281 } | 281 } |
| 282 | 282 |
| 283 /** | 283 /** |
| 284 * @param {*} o | 284 * @param {*} o |
| 285 * @return {boolean} | 285 * @return {boolean} |
| 286 */ | 286 */ |
| 287 function $isString(o) { | 287 function $isString(o) { |
| 288 return typeof o == 'string' || o instanceof String; | 288 return typeof o == 'string'; |
| 289 } | 289 } |
| OLD | NEW |