Skip to content

nektro/js-polyfills

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 

Repository files navigation

js-polyfills

Some ECMAScript function you've always wanted but never had access to...


String.prototype.replaceAll
`(with, what)` :: Replace all occurences of {with} with {what}
Array.prototype.random
`()` :: Return the value of this Array at a random index
HTMLCollection.prototype.indexOf
`(i)` :: Alias of Array.prototype.indexOf for HTMLCollection
HTMLCollection.prototype.forEach
`(fn(v,i))` :: Alias of Array.prototype.forEach for HTMLCollection
Array.prototype.powerSet
`()` :: Return the [power set](https://en.wikipedia.org/wiki/Power_set) of this Array as an Iterable
Array.prototype.clean
`(v)` :: Return this Array with all occurences of `{v}` removed

About

Some ECMAScript functions you've always wanted but never had...

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

 

Packages

No packages published