MCPcopy Create free account
hub / github.com/ampproject/amphtml / instanceSort

Function instanceSort

extensions/amp-bind/0.1/bind-expression.js:92–104  ·  view source on GitHub ↗

* Needs to be wrapped to avoid a duplicate name conflict with the deprecated * sort function above. * @return {!Function}

()

Source from the content-addressed store, hash-verified

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 = {

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected