UNPKG

qsu

Version:

qsu is a utility library that contains useful and frequently used functions. Start with your preferred language and the modern development environment.

1 lines 186 B
import{posix as t}from"path";import{toPosixFilePath as e}from"./toPosixFilePath.js";export function getFilePathLevel(o){return o?"/"===o?1:e(o.replace(/\\+$/,"")).split(t.sep).length:-1}