Skip to content

Instantly share code, notes, and snippets.

View r0bertinski's full-sized avatar

Rob r0bertinski

  • Hua Hin
View GitHub Profile
r0bertinski / 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';
name: 'pairs'
export class PairsPipe implements PipeTransform {
transform( arr: any[] ): any[] {
const pares = arr.reduce( (result, value, index, array) => {