docs: function removeExtension(path) {
    let leadingDot, endSlash = path.lastIndexOf('/');
  
    if (endSlash > -1) {
      leadingDot = path.indexOf('.', endSlash);
    } else {
      leadingDot = path.indexOf('.');
    }
  
    if (leadingDot > -1) {
      path = path.substr(0, leadingDot);
    }
    return path;
  }