Converts an indexed (array-like) value into a reversed iterable.
This is to produce a maximum-performance reversed iterable, by wrapping data into iterable and applying logical reversal (without any processing) at the same time.
import {reverse} from 'iter-ops';const i = reverse('word'); //=> Iterable<string>console.log([...i]); //=> ['d', 'r', 'o', 'w'] Copy
import {reverse} from 'iter-ops';const i = reverse('word'); //=> Iterable<string>console.log([...i]); //=> ['d', 'r', 'o', 'w']
TypeError: 'An array-like value was expected: ...' when the input is not array-like.
TypeError: 'An array-like value was expected: ...'
Converts an indexed (array-like) value into a reversed iterable.
This is to produce a maximum-performance reversed iterable, by wrapping data into iterable and applying logical reversal (without any processing) at the same time.