(fn)
| 9363 | |
| 9364 | var thisAssignmentPattern = /this\s*\.\s*\S+\s*=/; |
| 9365 | function isClass(fn) { |
| 9366 | try { |
| 9367 | if (typeof fn === "function") { |
| 9368 | var keys = es5.names(fn.prototype); |
| 9369 | |
| 9370 | var hasMethods = es5.isES5 && keys.length > 1; |
| 9371 | var hasMethodsOtherThanConstructor = keys.length > 0 && |
| 9372 | !(keys.length === 1 && keys[0] === "constructor"); |
| 9373 | var hasThisAssignmentAndStaticMethods = |
| 9374 | thisAssignmentPattern.test(fn + "") && es5.names(fn).length > 0; |
| 9375 | |
| 9376 | if (hasMethods || hasMethodsOtherThanConstructor || |
| 9377 | hasThisAssignmentAndStaticMethods) { |
| 9378 | return true; |
| 9379 | } |
| 9380 | } |
| 9381 | return false; |
| 9382 | } catch (e) { |
| 9383 | return false; |
| 9384 | } |
| 9385 | } |
| 9386 | |
| 9387 | function toFastProperties(obj) { |
| 9388 | /*jshint -W027,-W055,-W031*/ |
nothing calls this directly
no outgoing calls
no test coverage detected