vm/src/lib.js
function (table, index, obj) {
			if (!((table || shine.EMPTY_OBJ) instanceof shine.Table)) throw new shine.Error('Bad argument #1 in table.insert(). Table expected');
	
			if (obj == undefined) {
				obj = index;
				index = table.__shine.numValues.length;
			} else {
				index = shine.utils.coerceToNumber(index, "Bad argument #2 to 'insert' (number expected)");
			}
	
			table.__shine.numValues.splice(index, 0, undefined);
			table.setMember(index, obj);
		}
function (table, index, obj) {
			if (!((table || shine.EMPTY_OBJ) instanceof shine.Table)) throw new shine.Error('Bad argument #1 in table.insert(). Table expected');
	
			if (obj == undefined) {
				obj = index;
				index = table.__shine.numValues.length;
			} else {
				index = shine.utils.coerceToNumber(index, "Bad argument #2 to 'insert' (number expected)");
			}
	
			table.__shine.numValues.splice(index, 0, undefined);
			table.setMember(index, obj);
		}
function ( table , index , obj ) { if ( ! ( ( table || shine . EMPTY_OBJ ) instanceof shine . Table ) ) throw new shine . Error ( 'Bad argument #1 in table.insert(). Table expected' ) ; if ( obj == undefined ) { obj = index ; index = table . __shine . numValues . length ; } else { index = shine . utils . coerceToNumber ( index , "Bad argument #2 to 'insert' (number expected)" ) ; } table . __shine . numValues . splice ( index , 0 , undefined ) ; table . setMember ( index , obj ) ; }
Implementation of Lua's table.insert function.
@param {object} table The table in which to insert.
@param {object} index The poostion to insert.
@param {object} obj The value to insert.
Implementation of Lua s table . insert function .