Wrench.js
Wrench.js is a JavaScript environment which bridges across server-side and browser-side JavaScript, it serves as the base for MonkeyScript's stdlib.
The project provides Array and String prototypes which fill in the gap of missing array and string manipulation methods in JavaScript, as well as a few extra helpers.
Go ahead and try it out, if you're on a desktop (this doesn't work for mobile browsers) just open up a console on this page, and try to .shuffle() an array, covert a "dash-separated-string".toCamelCase(), take a word and only captialize the first character using .toFirstUpperCase(), .trim() (whitespace) or .strip('characters') (a list of characters) from the ends of a string, reverse it, or .repeat(n) it a number of times.
Latest release is v1.0.0 built on September 2nd, 2009.
Download (v1.0.0)
- ReleaseBundles in tar.gz and zip formats.
- wrench15.js (full, minified) (Please don't hotlink, if we get to much traffic we may use mimetypes to force downloads)
- wrench17.js
- wrench18.js
What do I download?
- When in doubt, download a release bundle and read the README
- The browser uses wrench15 and there the a .min.js version for production use
- Rhino works best with wrench17 using -version 170
- SpiderMonkey works best with wrench18 if you are compiling 1.8+ (otherwise the 1.7 release is like Rhino)
- wrench15 uses tricks to work well with iframes (other globals), wrench17 and wrench18 assume only one global object. Use wrench15 server-side if you work with multiple scopes.
- wrench17 and wrench18 assume a Mozilla engine, thus
Object.getPrototypeOf();requires__proto__.