sigma.js javascript library; highly ruby influenced, async loading, OO methods, BDD tested, experimental
JavaScript Ruby
Fetching latest commit…
Cannot retrieve the latest commit at this time.


Sigma.js javascript library (somewhat experimental)
© 2010 Steven Soroka (MIT license)

Right now the most compelling feature is the ability to asynchronously load any script and execute code once it's loaded:

    Sigma.async_script_load('', '_', function() {
Or separate loading from the dependency!

    Sigma.wait_for_const_load('jQuery', function() {
      jQuery('#loaded').text('jQuery has been dynamically loaded');
Misc other examples:

    Sigma.string('ActiveRecord::Base').underscore() // returns 'active_record/base'
    Sigma.array(['one', 'two', 'three']).to_sentence() // returns 'one, two, and three'
    Sigma.benchmark(function() {
    }, 1000);  // returns milliseconds to execute 1000 times
Installing the latest version:

    curl > public/javascripts/sigma.js

See public/javascripts/sigma.js for other methods/docs

See spec/javascripts/*_spec.js for jasmine specs

Lots more pseudo-planned.  Feedback to @ssoroka