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

Function instanceSplice

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

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

()

Source from the content-addressed store, hash-verified

55 * @return {!Function}
56 */
57 function instanceSplice() {
58 /**
59 * @param {number=} unusedStart
60 * @param {number=} unusedDeleteCount
61 * @param {...?} unusedItems
62 * @return {!Array}
63 * @this {!Array}
64 */
65 function splice(unusedStart, unusedDeleteCount, unusedItems) {
66 const copy = Array.prototype.slice.call(this);
67 Array.prototype.splice.apply(copy, arguments);
68 return copy;
69 }
70 return splice;
71 }
72
73 /**
74 * Deprecated. Static, not-in-place variant of Array#sort.

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected