MCPcopy
hub / github.com/pyodide/pyodide / push

Method push

src/core/pyproxy.ts:2011–2018  ·  view source on GitHub ↗

* The :js:meth:`Array.push` method adds the specified elements to the end of * a :js:class:`PyMutableSequence`. * @param elts The element(s) to add to the end of the :js:class:`PyMutableSequence`. * @returns The new length property of the object upon which the method was * called.

(...elts: any[])

Source from the content-addressed store, hash-verified

2009 * called.
2010 */
2011 push(...elts: any[]) {
2012 for (let elt of elts) {
2013 // @ts-ignore
2014 this.append(elt);
2015 }
2016 // @ts-ignore
2017 return this.length;
2018 }
2019 /**
2020 * The :js:meth:`Array.pop` method removes the last element from a
2021 * :js:class:`PyMutableSequence`.

Callers 8

error_handling.tsFile · 0.45
callPyObjectKwargsFunction · 0.45
iter_helperFunction · 0.45
ownKeysFunction · 0.45
constructorMethod · 0.45

Calls 1

appendMethod · 0.45

Tested by

no test coverage detected