@skt-t1-byungi/array-flat-map

flatMap() for old browser, in typescript.

Usage no npm install needed!

<script type="module">
  import sktT1ByungiArrayFlatMap from 'https://cdn.skypack.dev/@skt-t1-byungi/array-flat-map';
</script>

README

@skt-t1-byungi/array-flat-map

flatMap() for old browser, in typescript.

Example

flatMap([1, 2], x => [x, x * 2])
// => [1, 2, 2, 4]

flatMap(array, mapper, [thisArg])

array

Target array.

mapper

Function that produces an element of the new Array.

thisArg

Value to use as this when executing callback.

License

MIT