Optional
The source array from which extract the values.
An array of indices.
A new array containing the values at the specified indices only.
import { extractByIndices } from '@untemps/utils/array/extractByIndices'const source = ['foo', 'bar', 'gag', 'pol', 'zux']const indices = [1, 3]extractByIndices(source, indices) // ['bar', 'pol'] Copy
import { extractByIndices } from '@untemps/utils/array/extractByIndices'const source = ['foo', 'bar', 'gag', 'pol', 'zux']const indices = [1, 3]extractByIndices(source, indices) // ['bar', 'pol']
The source array from which extract the values.