lib/collection.js
function(start, end, query) {
				//console.log("deep.store.Collection.range : ", start, end, query);
				var res = null;
				var total = 0;
				query = query || "";
				return deep.when(this.get(query))
					.done(function(res) {
						total = res.length;
						if (typeof start === 'string')
							start = parseInt(start);
						if (typeof end === 'string')
							end = parseInt(end);
						start = Math.min(start, total);
						res = res.slice(start, end + 1);
						end = start + res.length - 1;
						query += "&limit(" + (res.length) + "," + start + ")";
						return ranger.createRangeObject(start, end, total, res.length, deep.utils.copy(res), query);
					});
			}
function(start, end, query) {
				//console.log("deep.store.Collection.range : ", start, end, query);
				var res = null;
				var total = 0;
				query = query || "";
				return deep.when(this.get(query))
					.done(function(res) {
						total = res.length;
						if (typeof start === 'string')
							start = parseInt(start);
						if (typeof end === 'string')
							end = parseInt(end);
						start = Math.min(start, total);
						res = res.slice(start, end + 1);
						end = start + res.length - 1;
						query += "&limit(" + (res.length) + "," + start + ")";
						return ranger.createRangeObject(start, end, total, res.length, deep.utils.copy(res), query);
					});
			}
function ( start , end , query ) { //console.log("deep.store.Collection.range : ", start, end, query); var res = null ; var total = 0 ; query = query || "" ; return deep . when ( this . get ( query ) ) . done ( function ( res ) { total = res . length ; if ( typeof start === 'string' ) start = parseInt ( start ) ; if ( typeof end === 'string' ) end = parseInt ( end ) ; start = Math . min ( start , total ) ; res = res . slice ( start , end + 1 ) ; end = start + res . length - 1 ; query += "&limit(" + ( res . length ) + "," + start + ")" ; return ranger . createRangeObject ( start , end , total , res . length , deep . utils . copy ( res ) , query ) ; } ) ; }
select a range in collection
@method range
@param  {Number} start
@param  {Number} end
@return {deep.NodesChain} a chain that hold the selected range and has injected values as success object.
select a range in collection