* Needs to be wrapped to avoid a duplicate name conflict with the deprecated * sort function above. * @return {!Function}
()
| 90 | * @return {!Function} |
| 91 | */ |
| 92 | function instanceSort() { |
| 93 | /** |
| 94 | * @param {!Function} compareFunction |
| 95 | * @return {!Array} |
| 96 | * @this {!Array} |
| 97 | */ |
| 98 | function sort(compareFunction) { |
| 99 | const copy = Array.prototype.slice.call(this); |
| 100 | Array.prototype.sort.call(copy, compareFunction); |
| 101 | return copy; |
| 102 | } |
| 103 | return sort; |
| 104 | } |
| 105 | |
| 106 | // Prototype functions. |
| 107 | const allowlist = { |
no outgoing calls
no test coverage detected