Add isDarwin helper

This commit is contained in:
Sam Carlton 2022-05-08 10:57:16 -05:00
parent 4b3c9d1e9a
commit d37bf33095

View file

@ -4,3 +4,12 @@ import has from 'just-has'
export function isNuxt( VueThis ) {
return has( VueThis, [ '$nuxt' ])
}
// https://stackoverflow.com/a/8684009/1397641
export function isDarwin () {
if ( typeof navigator !== 'undefined' ) return false
if ( typeof process === 'undefined' ) return false
return process.platform === 'darwin'
}