UNPKG
smart-home
Version:
latest (0.5.16)
0.5.16
0.5.15
0.5.14
0.5.13
0.5.11
0.5.1
Netbeast dashboard, IoT apps manager
github.com/netbeast/dashboard
netbeast/dashboard
smart-home
/
lib
/
util
/
validate-app.js
10 lines
(8 loc)
•
254 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
var
path = require(
'path'
)
// returns
module.exports = function _validateApp (
file
) {
file
= path.resolve(
file
)
var
ext = [
file
.split(
'.'
)[
1
],
file
.split(
'.'
)[
2
]].
join
(
'.'
)
if
(ext ===
'tar.gz'
|| ext ===
'tgz.'
)
return
true
else
return
false
}