Extending JavaScript in all the right ways
CoffeeScript JavaScript Ruby
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
lib
mocha
source
test
.gitignore
Gemfile
LICENSE
README.md
Rakefile
cornerstone-source.gemspec
game.js
package.json
pixie.json

README.md

Cornerstone

Cornerstone is a JavaScript extension library that gives you the core classes you've always wanted. Fully tested and fully documented, Cornerstone runs in any JavaScript environment, from the browser to the server, or even on Xbox Live.

Array Extensions

Ruby's core library inspired the Cornerstone Array extensions. Staple methods include each, remove, select, and include. Fancier methods such as partition, rand, and extremes come in handy during game programming or web application development.

Number Extensions

JavaScript's Number class provides many useful methods, but sometimes leaves us hanging. Cornerstone extends Number.prototype with clamp, times, and abs. It also provides the classic utilities floor, ceil, and round. For a little spice, try primeFactors, toColorPart, or a host of other great methods for approaching and modifying numbers, and see where your imagination takes you.

String Extensions

Default JavaScript does a lot with String, but Cornerstone goes even further. Inspired by the Rails inflector, there are many methods to alter strings, such as titleize, underscore, and humanize. Methods like parse and constantize are especially powerful for metaprogramming.

Points and Matrices

You need 'em, we've got 'em!