lib/type/list.js
function linsert(beforeAfter, pivot, value) {
  //console.dir(pivot);
  //console.dir(this._data);
  var ind = this.indexOf(pivot);
  if(ind === -1) return ind;
  // note beforeAfter can be a buffer
  ind = (('' + beforeAfter) === BEFORE) ? ind : ind + 1;
  this._data.splice(ind, 0, value);
  return this._data.length;
}
function linsert(beforeAfter, pivot, value) {
  //console.dir(pivot);
  //console.dir(this._data);
  var ind = this.indexOf(pivot);
  if(ind === -1) return ind;
  // note beforeAfter can be a buffer
  ind = (('' + beforeAfter) === BEFORE) ? ind : ind + 1;
  this._data.splice(ind, 0, value);
  return this._data.length;
}
function linsert ( beforeAfter , pivot , value ) { //console.dir(pivot); //console.dir(this._data); var ind = this . indexOf ( pivot ) ; if ( ind === - 1 ) return ind ; // note beforeAfter can be a buffer ind = ( ( '' + beforeAfter ) === BEFORE ) ? ind : ind + 1 ; this . _data . splice ( ind , 0 , value ) ; return this . _data . length ; }
Inserts value in the list either before or after
the reference value pivot.
Inserts value in the list either before or after the reference value pivot .