Skip to content

Instantly share code, notes, and snippets.

View Nimelrian's full-sized avatar

Sebastian K Nimelrian

  • Germany
View GitHub Profile
function validatePath (path) {
const components = path.split('/');
const validatedFolderTree = [];
const getRootFolders = foldersApi.getTopLevelFolders();
const finalValidationPromise = components.reduce((promise, folder, index) => {
const folderName = folder.toLowerCase();
return promise
.then(parentChildren => {