Contracts for CoffeeScript
Pull request Compare This branch is 648 commits behind disnet:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
bin
contracts.js @ 92efa10
documentation
examples
extras
lib
src
test
.gitignore
.gitmodules
.npmignore
Cakefile
LICENSE
README
Rakefile
index.html
package.json
syntax.coffee

README

=
            {
         }   }   {
        {   {  }  }
         }   }{  {
        {  }{  }  }                    _____       __  __
       ( }{ }{  { )                   / ____|     / _|/ _|
     .- { { }  { }} -.               | |     ___ | |_| |_ ___  ___
    (  ( } { } { } }  )              | |    / _ \|  _|  _/ _ \/ _ \
    |`-..________ ..-'|              | |___| (_) | | | ||  __/  __/
    |                 |               \_____\___/|_| |_| \___|\___|
    |                 ;--.
    |                (__  \            _____           _       _
    |                 | )  )          / ____|         (_)     | |
    |                 |/  /          | (___   ___ _ __ _ _ __ | |_
    |                 (  /            \___ \ / __| '__| | '_ \| __|
    |                 |/              ____) | (__| |  | | |_) | |_
    |                 |              |_____/ \___|_|  |_| .__/ \__|
     `-.._________..-'                                  | |
                                                        |_|
                                                    with contracts!

  Contracts.coffee is an extension to CoffeeScript that adds contracts.

  Contracts allow you to write powerful runtime assertions about your code. 
  Like types but less painful, like assert but more useful.

  square :: (Num) -> Num
  square = (x) -> x * x

  Install Node.js, and then the CoffeeScript compiler:
  sudo bin/cake install

  Compile a script:
  coffee -cC /path/to/script.coffee

  The -C flag enables contracts in the generated JavaScript.
  If you want to disable contracts simple leave off the flag.

  For documentation, usage, and examples of Contracts.coffee see:
  http://disnetdev.com/contracts.coffee/

  For discussion about contracts.coffee check out the google group:
  https://groups.google.com/forum/?hl=en#!forum/contractscoffee

  For documentation, usage, and examples of CoffeeScript see:
  http://coffeescript.org/

  Note that Contracts.coffee requires some pretty new features of Javascript 
  (in particular Proxies: https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Proxy) 
  so it currently only works on Firefox 4+ but other JavaScript engines should
  be adding support soon.