Skip to content

Commit

Permalink
Merge ddf53d6 into 0bf92c8
Browse files Browse the repository at this point in the history
  • Loading branch information
Kikobeats committed Sep 26, 2021
2 parents 0bf92c8 + ddf53d6 commit 76d7dd8
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 4 deletions.
12 changes: 11 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,15 @@

module.exports = (platform = '') => {
platform = platform.toLowerCase()
return ['linux', 'darwin', 'freebsd', 'sunos'].indexOf(platform) !== -1
return (
[
'aix',
'android',
'darwin',
'freebsd',
'linux',
'openbsd',
'sunos'
].indexOf(platform) !== -1
)
}
8 changes: 5 additions & 3 deletions test/true.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ const test = require('ava')

const isUNIX = require('..')

;['linux', 'darwin', 'freebsd', 'sunos'].forEach(input => {
test(input, t => t.true(isUNIX(input)))
})
;['aix', 'android', 'darwin', 'freebsd', 'linux', 'openbsd', 'sunos'].forEach(
input => {
test(input, t => t.true(isUNIX(input)))
}
)

0 comments on commit 76d7dd8

Please sign in to comment.