Content-Length: 301938 | pFad | https://github.com/plusdude/array-generics

AB GitHub - plusdude/array-generics: Polyfill for JavaScript 1.8.5 Array Generics and ECMAScript 5 Array Extras · GitHub
Skip to content
This repository was archived by the owner on Sep 13, 2021. It is now read-only.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

74 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

About

Implementation of standard Array methods (introduced in ECMAScript 5th edition) and shorthand generics (JavaScript 1.8.5) Browser support: Internet Explorer 6+, Firefox 1.5+, Chrome, Safari, Opera.

Examples

function isElement(element) {
    return element.nodeType === 1;
}

// example #1
console.log(
    // shorthand slice and standard filter
    Array.slice(document.childNodes).filter(isElement)
);

// example #2
console.log(
    // shorthand filter
    Array.filter(document.childNodes, isElement)
);

Usage

Just include into your document:

<script src="path_to/array.generics.min.js"></script>

Methods

Available as generics and standard:

Mutator Accessor Iteration Other
pop concat forEach isArray
push join every
reverse slice some
shift indexOf filter
sort lastIndexOf map
splice reduce
unshift reduceRight

About

Polyfill for JavaScript 1.8.5 Array Generics and ECMAScript 5 Array Extras

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages









ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: https://github.com/plusdude/array-generics

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy