Returns everything before the last /
765699
function() {
			// remove any query string
			var cleaned = this.clean(),
				// get the last /
				last = cleaned.lastIndexOf('/'),
			    // if there is a last /, get everything up to that point
				dir = (last != -1) ? cleaned.substring(0, last) : '';
			// make sure we aren't left with just https/ or file:/
			return /^(https?:\/|file:\/)$/.test(dir) ? cleaned : dir;
		}
607447
function last(array) {
      var length = array == null ? 0 : array.length;
      return length ? array[length - 1] : undefined$1;
    }
722405
def S(self):
    "'"
    if self.data.day in (11, 12, 13): # Special case
      return u'th'
    last = self.data.day % 10
    if last == 1:
      return u'st'
    if last == 2:
      return u'nd'
    if last == 3:
      return u'rd'
    return u'th'
1133996
function (uri) {
	var lastSlash = uri.lastIndexOf("/");
	var sub;
	if (lastSlash == -1) {
		sub = uri;
	} else {
		sub = uri.substr(lastSlash + 1);
	}
	sub = sub.toLowerCase();
	var parsed = parseModuleName(sub);
	var path = removeFiletype(parsed.modulePath || sub);
	var matches = path.match(/^[\w-\s\.]+/);
	return matches ? matches[0] : "";
}
1034790
function(path) {
    if (path.slice(-1) == '/') {
        path = path.substring(0, path.length - 1);
    }
    var lastSlash = path.lastIndexOf('/');
    return (lastSlash > 0) ? path.substring(0, lastSlash) : "";
}
1046985
def get_last_offset(self, field, filters_=[]):
        '''
            
        '''

        offset = self.get_last_item_field(field, filters_=filters_, offset=True)

        return offset
796196
function lastNonEmptyLine (linesArray) {
  let idx = linesArray.length - 1

  while (idx >= 0 && !linesArray[idx]) {
    idx--
  }

  return idx
}
599068
function getBaseName(fullPath) {
        var lastSlash = fullPath.lastIndexOf("/");
        if (lastSlash === fullPath.length - 1) {  // directory: exclude trailing "/" too
            return fullPath.slice(fullPath.lastIndexOf("/", fullPath.length - 2) + 1, -1);
        } else {
            return fullPath.slice(lastSlash + 1);
        }
    }
888432
def last(predicate=None):
    """"""

    predicate = true if predicate is None else predicate

    def last_transducer(reducer):
        return Last(reducer, predicate)

    return last_transducer
643540
def _last_values(self):
        
        if not self.session.get('last_request_uri'):
            self.session.last_request_uri = None
        self.session.last_request_at = self.session.get('last_request_at', 0)
227356
function Last() {
        $items = $this->ToArray();
        $cnt = count($items);
        return $cnt > 0 ? $items[$cnt -1] : null;
    }
783606
public static function getEndAfterLast(string $haystack, string $needle) : string
    {
        $lastOccurence = strrchr($haystack, $needle);
        if ($lastOccurence === false) {
            return $haystack;
        }
        return ltrim(strrchr($haystack, $needle), $needle);
    }
728689
function getLastItem(node) {
            switch (node.type) {
                case "ObjectExpression":
                case "ObjectPattern":
                    return lodash.last(node.properties);
                case "ArrayExpression":
                case "ArrayPattern":
                    return lodash.last(node.elements);
                case "ImportDeclaration":
                case "ExportNamedDeclaration":
                    return lodash.last(node.specifiers);
                case "FunctionDeclaration":
                case "FunctionExpression":
                case "ArrowFunctionExpression":
                    return lodash.last(node.params);
                case "CallExpression":
                case "NewExpression":
                    return lodash.last(node.arguments);
                default:
                    return null;
            }
        }
814165
def get_last(self, num=10):
        
        max_item = self.get_max_item()
        urls = [urljoin(self.item_url, F"{i}.json") for i in range(
            max_item - num + 1, max_item + 1)]
        result = self._run_async(urls=urls)
        return [Item(r) for r in result if r]
477248
function listPrev(node, pred) {
  pred = pred || func.fail;

  const nodes = [];
  while (node) {
    if (pred(node)) { break; }
    nodes.push(node);
    node = node.previousSibling;
  }
  return nodes;
}
770757
@Override
    public int last() {
        fCachedBreakPositions = null;
        fDictionaryCharCount = 0;
        fPositionInCache = 0;

        if (fText == null) {
            fLastRuleStatusIndex  = 0;
            fLastStatusIndexValid = true;
            return BreakIterator.DONE;
        }

        // t.last() returns the offset of the last character,
        // rather than the past-the-end offset
        // so a loop like for(p=it.last(); p!=DONE; p=it.previous()) ...
        // will work correctly.
        fLastStatusIndexValid = false;
        int pos = fText.getEndIndex();
        fText.setIndex(pos);
        return pos;
    }
1336685
def where_entry_last(query, ref):
    
    return orm.select(
        e for e in query
        if e.local_date < ref.local_date or
        (e.local_date == ref.local_date and
         e.id <= ref.id
         )
    )