ie-array-filter-polyfill

1.0.0 • Public • Published

ie-array-filter-polyfill

Polyfill to provide array.filter on IE < 9

Installation

To install the stable version:

npm install ie-array-filter-polyfill --save

Use

import "ie-array-filter-polyfill";

Example

'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 }
]

Readme

Keywords

Package Sidebar

Install

npm i ie-array-filter-polyfill

Weekly Downloads

3

Version

1.0.0

License

MIT

Last publish

Collaborators

  • abdalla