Skip to content

Instantly share code, notes, and snippets.

View r0bchain's full-sized avatar

Rob r0bchain

View GitHub Profile
@r0bchain
r0bchain / ionic
Last active March 15, 2020 03:11
Create and array with pairs of arrays (create subarrays with pairs).
import { Pipe, PipeTransform } from '@angular/core';
@Pipe({
name: 'pairs'
})
export class PairsPipe implements PipeTransform {
transform( arr: any[] ): any[] {
const pares = arr.reduce( (result, value, index, array) => {