jquery plugins for async versions of map, filter and each.
JavaScript Ruby
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
components/jquery
lib
public/javascripts
spec/javascripts
Gemfile
Gemfile.lock
README.md
Rakefile
c.cjs
component.json

README.md

jQuery unsynchronous

Jquery plugins for async versions of map, filter and each.

Developed with livescript and continuation.js.

see jquery.unsynchronous.ls for original code and jquery.unsynchronous.js for compiled code.

amap

jQuery(selector).amap(iterator,callback_result)

 jQuery([1 2 3 4 5]).amap (
    function(element) { return element + 10}, 
    function(new_list) { console.log(new_list) }
 );

afilter

jQuery(selector).afilter(iterator,callback_result)

 jQuery([1 2 3 4 5]).amap (
    function(element) { return element >= 4}, 
    function(new_list) { console.log(new_list) }
 );

aeach

jQuery(selector).aeach(iterator,callback_result)

 jQuery("div").aeach (
    function(element) { $(element ).innerHtml = "hello" }, 
    function() { console.log("done") }
 );