UNPKG

@acurast/cli

Version:

A cli to interact with the Acurast Cloud.

10 lines 396 B
import path from 'path'; export const getDirectoryFromFilePath = (filePath) => { const basename = path.basename(filePath); if (!basename.startsWith('.') && basename.includes('.')) { // It's a filename, need to cut off last part return filePath.substring(0, filePath.lastIndexOf(path.sep)); } return filePath; }; //# sourceMappingURL=getDirectoryFromFilePath.js.map