This repository was archived by the owner on Sep 13, 2021. It is now read-only.
- Notifications
You must be signed in to change notification settings - Fork10
Polyfill for JavaScript 1.8.5 Array Generics and ECMAScript 5 Array Extras
License
NotificationsYou must be signed in to change notification settings
plusdude/array-generics
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
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.
functionisElement(element){returnelement.nodeType===1;}// example #1console.log(// shorthand slice and standard filterArray.slice(document.childNodes).filter(isElement));// example #2console.log(// shorthand filterArray.filter(document.childNodes,isElement));
Just include into your document:
<scriptsrc="path_to/array.generics.min.js"></script>
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
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Releases
No releases published
Packages0
No packages published