| 1617 | var warning = __webpack_require__(/*! fbjs/lib/warning */ 1); |
| 1618 | |
| 1619 | function isNative(fn) { |
| 1620 | // Based on isNative() from Lodash |
| 1621 | var funcToString = Function.prototype.toString; |
| 1622 | var hasOwnProperty = Object.prototype.hasOwnProperty; |
| 1623 | var reIsNative = RegExp('^' + funcToString |
| 1624 | // Take an example native function source for comparison |
| 1625 | .call(hasOwnProperty) |
| 1626 | // Strip regex characters so we can use it for regex |
| 1627 | .replace(/[\\^$.*+?()[\]{}|]/g, '\\$&') |
| 1628 | // Remove hasOwnProperty from the template to make it generic |
| 1629 | .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'); |
| 1630 | try { |
| 1631 | var source = funcToString.call(fn); |
| 1632 | return reIsNative.test(source); |
| 1633 | } catch (err) { |
| 1634 | return false; |
| 1635 | } |
| 1636 | } |
| 1637 | |
| 1638 | var canUseCollections = |
| 1639 | // Array.from |