UNPKG
fliphub-monorepo
Version:
latest (0.1.3)
0.1.3
0.1.2
the builder of builders
github.com/fliphub/fliphub
fliphub/fliphub
fliphub-monorepo
/
modules
/
flipfile
/
getFileAndPath.js
10 lines
(9 loc)
•
221 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
module.exports =
function
getFileAndPath
(
file
)
{
const
split =
file
.split(
'/'
)
const
fileAndPath = {
file
: split.pop(), paths: split.
join
(
'/'
), } fileAndPath.dir = fileAndPath.paths
return
fileAndPath }