mac()
更新日: 2018-09-14
is.mac()
現在の端末のOSがmacOSかどうかを判定します。
- インターフェース:
- not
is.mac();
=> 端末のOSがmacOSならtrueを返します。
is.not.mac();
=> 端末のOSがmacOSでないならtrueを返します。デモ
端末を判定してconsole.logを出力します。
JavaScript
if (is.windows()) {
  console.log('使用している端末のOSはWindowsです。');
} else {
  console.log('使用している端末のOSはWindowsではありません。');
}© 2014-2016 Aras Atasaygin Released under the MIT license
このコンテンツはAras Atasaygin(arasatasaygin)によるis.jsドキュメントを翻訳/改変したものです。