UNPKG
@uxland/functional
Version:
alpha (1.0.0-alpha.1)
latest (1.0.0-alpha.3)
1.0.0-alpha.3
1.0.0-alpha.2
1.0.0-alpha.1
1.0.0-alpha.0
Functional
github.com/uxland/uxland/tree/master/packages/functional
uxland/uxland
@uxland/functional
/
src
/
ramda
/
to-path.ts
4 lines
(3 loc)
•
156 B
text/typescript
View Raw
1
2
3
4
import
{split,when, is,
Path
}
from
'ramda'
;
const
pathSplit =
split
(
'.'
);
export
const
toPath
:
(
path
:
string
|
Path
) =>
Path
=
when
(
is
(
String
), pathSplit);