UNPKG
file-check
Version:
latest (1.0.0)
1.0.0
Check if path is a file
github.com/tobihrbr/file-check
tobihrbr/file-check
file-check
/
test.js
8 lines
(6 loc)
•
142 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
const
check =
require
(
'./lib/app.js'
);
if
(
check
(
'test.js'
)) {
console
.
log
(
'is a file'
); }
else
{
console
.
log
(
'is not a file'
); }