MCPcopy
hub / github.com/pyodide/pyodide / map

Method map

src/core/pyproxy.ts:1706–1712  ·  view source on GitHub ↗

* See :js:meth:`Array.map`. Creates a new array populated with the results of * calling a provided function on every element in the calling ``Sequence``. * @param callbackfn A function to execute for each element in the ``Sequence``. Its * return value is added as a single element in the ne

(
    callbackfn: (elt: any, index: number, array: any) => U,
    thisArg?: any,
  )

Source from the content-addressed store, hash-verified

1704 * @param thisArg A value to use as ``this`` when executing ``callbackFn``.
1705 */
1706 map<U>(
1707 callbackfn: (elt: any, index: number, array: any) => U,
1708 thisArg?: any,
1709 ): U[] {
1710 // @ts-ignore
1711 return Array.prototype.map.call(this, callbackfn, thisArg);
1712 }
1713 /**
1714 * See :js:meth:`Array.filter`. Creates a shallow copy of a portion of a given
1715 * ``Sequence``, filtered down to just the elements from the given array that pass

Callers 7

initializeNativeFSFunction · 0.80
base16ToBase64Function · 0.80
downloadAndInstallMethod · 0.80
dirsToMountFunction · 0.80
error_handling.tsFile · 0.80
calculateFfiFieldsFunction · 0.80

Calls 1

callMethod · 0.80

Tested by

no test coverage detected