add support for paths on py-env so that we can load local (sort of) scripts into the environment

This commit is contained in:
Fabio Pliger
2022-04-12 19:04:26 -05:00
parent 1966f1c8b7
commit 67be46f224
3 changed files with 50 additions and 4 deletions

View File

@@ -1,6 +1,12 @@
export function addClasses(element: HTMLElement, classes: Array<string>){
function addClasses(element: HTMLElement, classes: Array<string>){
for (let entry of classes) {
element.classList.add(entry);
}
}
const getLastPath = function (str) {
return str.split('\\').pop().split('/').pop();
}
export {addClasses, getLastPath}