on.js Wiki
Integrated Performance Environment Library (client-side JavaScript)
Brought to you by:
clayendisk
new Object();
Objects
Objects should be simple and universal, on.js makes everything possible in one easy step.
Properties
var myObject =
{ 'abc' : 123
, 'xyz' : 789
};
('count')[on](myObject)(); //returns total # of properties [2]
Property Names as Indices
var myObject =
{ 'abc' : 123
, 'xyz' : 789
};
('count')[on](myObject)(1); //returns property name ['xyz'] at index [1]
Property Values at Indices
var myObject =
{ 'abc' : 123
, 'xyz' : 789
};
('count')[on](myObject)(1,true); //returns property value [789] at index [1]
return true;
A JavaScript Library