@nathanfaucett/array-map

creates a new array with the results of calling a provided function on every element in this array.

Usage no npm install needed!

<script type="module">
  import nathanfaucettArrayMap from 'https://cdn.skypack.dev/@nathanfaucett/array-map';
</script>

README

array-map

array map for the browser and node.js

var arrayMap = require("@nathanfaucett/array-map");


var array = arrayMap([1, 2, 3, 4, 5, 6], function(value, index, array) {
    return value % 2 === 0;
});

array === [2, 4, 6];