There is underscore.js specifically for node.js that implements most prototypes of your favorite functions:
Underscore is a utility-belt library for JavaScript that provides a lot of the functional programming support that you would expect in Prototype.js.
It is faster than the prototype itself because it does not extend any of the built-in JavaScript objects.
In this regard, the syntax is slightly different:
// prototype.js: anArray.each(function(){ ... }); // underscore.js: _ = require('underscore'); _.each(anArray, function(){ ... });
If you are looking for String prototypes such as trim , look underscore.string
RienNeVaPlu͢s
source share