vm/src/lib.js
function (table, index) {
			if (!((table || shine.EMPTY_OBJ) instanceof shine.Table)) throw new shine.Error('Bad argument #1 in table.remove(). Table expected');
	
			var max = shine.lib.table.getn(table),
				vals = table.__shine.numValues,
				result;

			if (index > max) return;
			if (index == undefined) index = max;
				
			result = vals.splice(index, 1);
			while (index < max && vals[index] === undefined) delete vals[index++];

			return result;
		}
function (table, index) {
			if (!((table || shine.EMPTY_OBJ) instanceof shine.Table)) throw new shine.Error('Bad argument #1 in table.remove(). Table expected');
	
			var max = shine.lib.table.getn(table),
				vals = table.__shine.numValues,
				result;

			if (index > max) return;
			if (index == undefined) index = max;
				
			result = vals.splice(index, 1);
			while (index < max && vals[index] === undefined) delete vals[index++];

			return result;
		}
function ( table , index ) { if ( ! ( ( table || shine . EMPTY_OBJ ) instanceof shine . Table ) ) throw new shine . Error ( 'Bad argument #1 in table.remove(). Table expected' ) ; var max = shine . lib . table . getn ( table ) , vals = table . __shine . numValues , result ; if ( index > max ) return ; if ( index == undefined ) index = max ; result = vals . splice ( index , 1 ) ; while ( index < max && vals [ index ] === undefined ) delete vals [ index ++ ] ; return result ; }
Implementation of Lua's table.remove function.
@param {object} table The table from which to remove an element.
@param {object} index The position of the element to remove.
Implementation of Lua s table . remove function .