Javascript has array_map called Array.prototype.map(), it has an array_merge method called Array.prototype.concat(), array_reject can be achieved using Array.prototype.filter() and so on. These functions are a poor reimplementation of some native features.
The implementation of the functions can be refactored to call the methods of Arrray.prototype and Javascript's prototypical inheritance means that the abstractions in the library will remain robust even if the refactoring were done during runtime.
The value of the library is improving the names of the abstractions over arrays in a way that may better express a particular programmer's thought process. Better expressing a particular programmer's thought process via abstraction is why we don't all write in machine code.
[+] [-] onion2k|8 years ago|reply
[+] [-] brudgers|8 years ago|reply
The value of the library is improving the names of the abstractions over arrays in a way that may better express a particular programmer's thought process. Better expressing a particular programmer's thought process via abstraction is why we don't all write in machine code.
[+] [-] krapp|8 years ago|reply
Or, I guess the modern method would be why not publish every line of every function as a separate NPM package?
[+] [-] drivingmenuts|8 years ago|reply
PHP functions written in Javascript. Been around for quite a while, actually.