export const getBasename = (path) => {
  const parts = path.split('/');
  return parts[parts.length - 1];
};

export const getExtension = (path) => {
  const parts = path.split(/[./]/);
  return parts[parts.length - 1];
};

export const IMAGE_EXTENSIONS = new Set(['jpg', 'bmp', 'jpeg', 'png', 'gif', 'svg']);
export const TEXT_EXTENSIONS = new Set(
  ['txt', 'log', 'py', 'js', 'yaml', 'yml', 'json', 'csv', 'tsv',
    'md', 'rst', 'MLmodel', 'MLproject']);

@@ -448,12 +448,23 @@
 project'
+, 'jsonnet'
 %5D);%0A

add jsonnet as a valid text file format (#1683)