A LUA-style table implementation that allows for arbitrary data types for keys.
var myTable = new Table();
None
Set a value for a specific key. Note that the key can be anything - a function, an object, an element, etc.
myTable.set(key, value);
var myTable = new Table(); myTable.set($('myForm'), {foo: 'bar'}); myTable.set(myClassInstance, $$('.someElements'));
Get a value for a specific key.
myTable.get(key);
Erase a given key/value from the Table instance.
myTable.erase(key);
Iterates over the key/values in the table.
myTable.each(function, bind);
var myTable = new Table(); // first set some values myTable.set($('myForm'), {foo: 'bar'}); myTable.set(myClassInstance, $$('.someElements')); // and now iterate over them myTable.each(function(value, key){ console.log(value, key); });
This documentation is released under a Attribution-NonCommercial-ShareAlike 3.0 License.