MCPcopy Index your code
hub / github.com/nodejs/node / map

Function map

lib/punycode.js:65–72  ·  view source on GitHub ↗

* A generic `Array#map` utility function. * @private * @param {Array} array The array to iterate over. * @param {Function} callback The function that gets called for every array * item. * @returns {Array} A new array of values returned by the callback function.

(array, callback)

Source from the content-addressed store, hash-verified

63 * @returns {Array} A new array of values returned by the callback function.
64 */
65function map(array, callback) {
66 const result = [];
67 let length = array.length;
68 while (length--) {
69 result[length] = callback(array[length]);
70 }
71 return result;
72}
73
74/**
75 * A simple `Array#map`-like wrapper to work with domain name strings or email

Callers 4

mapDomainFunction · 0.70
try_check_compilerFunction · 0.50
check_compilerFunction · 0.50
configure_nodeFunction · 0.50

Calls 1

callbackFunction · 0.50

Tested by

no test coverage detected