UNPKG
@sudoo/coco
Version:
latest (1.8.5)
1.8.5
1.8.4
1.8.3
1.8.2
1.8.1
1.8.0
1.7.1
1.7.0
1.6.0
1.5.0
1.4.0
1.3.4
1.3.3
1.3.2
1.3.1
1.3.0
1.2.0
1.1.0
1.0.0
0.0.2
0.0.1
:ocean: A simple command line tool framework
github.com/sudoo/Coco
sudoo/Coco
@sudoo/coco
/
command
/
util.js
15 lines
(14 loc)
•
331 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
"use strict"
;
Object
.
defineProperty
(
exports
,
"__esModule"
, {
value
:
true
});
exports
.
isCallingRoot
=
(
args
) =>
{
if
(args.
length
===
0
) {
return
true
; }
if
(
exports
.
isOption
(args[
0
])) {
return
true
; }
return
false
; };
exports
.
isOption
=
(
piece
) =>
{
return
piece.
substring
(
0
,
1
) ===
'-'
; };