chaining JavaScript without extending objects' prototypes
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

UnlimitJS brings chaining to native JavaScript objects without extending objects' prototypes. It has a simply API and increases the readability of common code.

  1. for in loops are safe to use
  2. Chaining is super easy obj[fun]()[fun]()
  3. Unlimitjs is Javascript, no compiling

UnlimitJS intends to bring chaining and readability to Javascript.
Instead of writing:trim(' string ') you write ' string '[trim]()

var trim = function(){
  return this.replace(/^\s+|\s+$/g,'');

' string '[trim]();

UnlimitJS is 436 bytes gzipped and compressed. UnlimitJs has been tested and works in IE6+, Firefox 3.0+, Safari 3.0+, Chrome and Opera. For node.js users simply do

npm install unlimit

##API Calling [Unlimit]() binds the this context to the object you are calling on.

var yell = function(){
  return alert(''+this);

'This string is bond to "this" in function.'[yell]()

Calling [Unlimit](true) tells the object your calling on to be passed as the first argument to the function.

var yell = function(obj){
  return alert(''+obj);

'1st argument is bound to this string.'[yell]()

Calling object[Unlimit](function(){}) allows you to unlimit objects other then Function. s.

var yell = {};
'This string is bond to the attached function.'[yell]()

Checkout the site for more info and examples.

Unlimit is licensed under the MIT license.