(obj)
| 1602 | // Safely create a real, live array from anything iterable. |
| 1603 | var reStrSymbol = /[^\ud800-\udfff]|[\ud800-\udbff][\udc00-\udfff]|[\ud800-\udfff]/g; |
| 1604 | function toArray(obj) { |
| 1605 | if (!obj) return []; |
| 1606 | if (isArray(obj)) return slice.call(obj); |
| 1607 | if (isString(obj)) { |
| 1608 | // Keep surrogate pair characters together. |
| 1609 | return obj.match(reStrSymbol); |
| 1610 | } |
| 1611 | if (isArrayLike(obj)) return map(obj, identity); |
| 1612 | return values(obj); |
| 1613 | } |
| 1614 | |
| 1615 | // Return the number of elements in a collection. |
| 1616 | function size(obj) { |
nothing calls this directly
no test coverage detected