Polyfill to provide array.filter on IE < 9
To install the stable version:
npm install ie-array-filter-polyfill --save
import "ie-array-filter-polyfill";
'use strict';
require('ie-array-filter-polyfill');
const people = [
{
name: 'Joe Due',
age: 35
},
{
name: 'Parker Manson',
age: 75
},
{
name: 'Junior Manson',
age: 20
},
{
name: 'Baby Due',
age: 3
},
];
const folks = people.filter(x => x.age > 1 && x.age <= 20 );
console.log('FOLKS: ', folks);
>node example.js
//RESULT
FOLKS: [
{ name: 'Junior Manson', age: 20 },
{ name: 'Baby Due', age: 3 }
]