remove blank(or only includes space and tab) item in array
@param array
@returns {*}
1290
function trimEndBlankLines(array) {

    if (!array || array.length < 1) {
        return array;
    }

    let temp;
    while (array.length > 0) {
        temp = array[array.length - 1];
        if (temp === '' || Str.trim(temp, ' \t') === '') {
            array.pop();
        } else {
            break;
        }
    }

    return array;

}
1015562
public static String[] removeDuplicateStrings(String[] array) {
        if (isEmpty(array)) {
            return array;
        }
        Set<String> set = new TreeSet<String>();
        Collections.addAll(set, array);
        return toStringArray(set);
    }
939401
function(array) {
            var ln = array.length,
                newAry = [];
            for (var i = 0; i < ln; i++) {
                if (jsonQ.index(newAry, array[i]) == -1) {
                    newAry.push(array[i]);
                }
            }
            return newAry;
        }
167442
def blank?
      !params_given? and (
        (text.is_a?(Array) and text.compact.size < 2) or
        text.to_s.match(/\A\s*\z/)
      )
    end
1313947
function removeFromArrayByNode(node, eleNode) {
  const elements = node.elements;

  if (!elements.includes(eleNode)) {
    logger.warn('Failed to find element when trying to remove element from array.');
    return [];
  }

  if (!node._filePath) {
    throw new Error('No _filePath property found on node when removing element from array');
  }

  const content = vio.getContent(node._filePath);

  let startPos = nearestCharBefore(',', content, eleNode.start);
  let isFirstElement = false;
  if (startPos < 0) {
    // it's the first element
    isFirstElement = true;
    startPos = node.start + 1; // start from the char just after the '['
  }

  let endPos = eleNode.end;

  if (elements.length === 1 || isFirstElement) {
    // if the element is the only element, try to remove the trailing comma if exists
    const nextComma = nearestCharAfter(',', content, endPos - 1);
    if (nextComma >= 0) endPos = nextComma + 1;
  }

  return [
    {
      start: startPos,
      end: endPos,
      replacement: '',
    },
  ];
}
1189624
public static function removeNull(array $array)
    {
        $result = [];
        foreach ($array as $key => $value) {
            if (is_null($value)) {
                continue;
            }
            $result[$key] = $value;
        }
        return $result;
    }
394975
function replaceInArray(array, indexToReplace, indexToInsert) {
        var _removedArray = array.splice(indexToReplace, 1);
        array.splice(indexToInsert, 0, _removedArray[0]);
        return array;
    }
1055647
private function trimArray(&$array)
    {
        foreach ($array as $key => $value) {
            if (is_string($value)) {
                $array[$key] = trim($value);
            } else if (is_array($value)) {
                $array[$key] = $this->trimArray($value);
            }
        }

        return $array;
    }
1295826
function stringifyArray(array, replacer, space, indent) {
  let childIndent = space ? (indent + space) : undefined;
  let str = space ? '[\n' : '[';

  // check for circular reference
  if (isCircular(array)) {
    return stringifyCircular(array, replacer, space, indent);
  }

  // add this array to the stack
  const stackIndex = stack.length;
  stack[stackIndex] = array;

  for (let i = 0; i < array.length; i++) {
    let key = i + '';
    let item = (typeof replacer === 'function')
        ? replacer.call(array, key, array[i])
        : array[i];

    if (space) {
      str += childIndent;
    }

    if (typeof item !== 'undefined' && typeof item !== 'function') {
      path[stackIndex] = key;
      str += stringifyValue(item, replacer, space, childIndent);
    }
    else {
      str += 'null'
    }

    if (i < array.length - 1) {
      str += space ? ',\n' : ',';
    }
  }

  // remove current entry from the stack
  stack.length = stackIndex;
  path.length = stackIndex;

  str += space ? ('\n' + indent + ']') : ']';
  return str;
}
1257219
public static byte[] removeSpaces(byte[] array) {
		ByteArrayOutputStream baos = new ByteArrayOutputStream(array.length);
		for (byte b : array) {
			if (b != ' ') {
				baos.write(b);
			}
		}
		return baos.toByteArray();
	}
1031427
public static <T extends CharSequence> T[] removeEmpty(T[] array) {
		return filter(array, new Filter<T>() {
			@Override
			public boolean accept(T t) {
				return false == StrUtil.isEmpty(t);
			}
		});
	}
516264
public static String[] nullToEmpty(String[] array) {
		return filter(array, new Editor<String>() {
			@Override
			public String edit(String t) {
				return null == t ? StrUtil.EMPTY : t;
			}
		});
	}
935615
private function removeUnrealizableInArray(array &$array)
    {
        $this->removeReferenceItemInArray($array);
        foreach ($array as &$value) {
            if (is_object($value)) {
                $value = $this->removeUnserializable($value);
            }
            if (is_array($value)) {
                $this->removeUnrealizableInArray($value);
            }
            if ($this->isUnserializable($value)) {
                $value = null;
            }
        }

        return $array;
    }
326965
function _removeArrayMember(arr, elem) {
		// TODO: use Array.indexOf for IE >= 9
		var i;
		for (i = arr.length - 1; i >= 0; i--) {
			if (arr[i] === elem) {
				arr.splice(i, 1);
				return true;
			}
		}
		return false;
	}
82905
function unique(array) {
      var uniqueItems = [], i = array.length, item;

      while (i--) {
        item = array[i];

        if (!item.__checked) {
          uniqueItems.push(item);
          item.__checked = 1;
        }
      }

      i = uniqueItems.length;
      while (i--) {
        delete uniqueItems[i].__checked;
      }

      return uniqueItems;
    }
1092054
function _removeEntry(stringArray, stringToRemove) {
    if (stringArray.indexOf(stringToRemove) > -1) {
        stringArray.splice(stringArray.indexOf(stringToRemove), 1);
    }
}
258012
function omit(obj, remove) {
  var result = {};
  if (typeof remove === 'string') {
    remove = [].slice.call(arguments, 1);
  }
  for (var prop in obj) {
    if (!obj.hasOwnProperty || obj.hasOwnProperty(prop)) {
      if (remove.indexOf(prop) === -1) {
        result[prop] = obj[prop];
      }
    }
  }
  return result;
}