Skip to content
This repository was archived by the owner on Dec 19, 2025. It is now read-only.

Commit 0217e53

Browse files
author
Axel Rindle
committed
Make use of coffeescript's existential operator
1 parent 624d820 commit 0217e53

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

lib/main.coffee

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -32,23 +32,23 @@ module.exports = (options, callback) ->
3232
###
3333
check = (options, callback) ->
3434
# get options
35-
token = options.token.trim()
36-
repo = options.repo.trim()
37-
owner = options.owner.trim()
38-
currentVersion = options.currentVersion.trim()
35+
token = options.token ? ''
36+
repo = options.repo ? ''
37+
owner = options.owner ? ''
38+
currentVersion = options.currentVersion ? ''
3939
fetchTags = options.fetchTags || false
4040

4141
# check if required options are defined
42-
if token is undefined or token is ''
42+
if token is ''
4343
callback('no token specified', null)
4444
return
45-
if repo is undefined or repo is ''
45+
if repo is ''
4646
callback('no repository specified', null)
4747
return
48-
if owner is undefined or owner is ''
48+
if owner is ''
4949
callback('no owner specified', null)
5050
return
51-
if currentVersion is undefined or currentVersion is ''
51+
if currentVersion is ''
5252
callback('no current version given', null)
5353
return
5454

0 commit comments

Comments
 (0)