UNPKG

@acurast/cli

Version:

A cli to interact with the Acurast Cloud.

12 lines 495 B
import path from 'path'; export const getDirectoryFromFilePath = (filePath) => { // Normalize the path to use the OS-specific separator const normalizedPath = path.normalize(filePath); const basename = path.basename(normalizedPath); if (!basename.startsWith('.') && basename.includes('.')) { // It's a filename, need to cut off last part return path.dirname(normalizedPath); } return normalizedPath; }; //# sourceMappingURL=getDirectoryFromFilePath.js.map