Nacho Pace Maker

    cmd-or-ctrl

    0.3.1 • Public • Published

    cmd-or-ctrl

    The main thing this package does is simply returning command or control based on the OS the user is using, and the another thing is to return the common names of OSs.

    NPM Package | CNPM

    How to use

    # npm 
    npm i cmd-or-ctrl
     
    # yarn 
    yarn add cmd-or-ctrl
    var cmdOrCtrl = require('cmd-or-ctrl');
     
    console.log(cmdOrCtrl.cmdOrCtrl())// ctrl / cmd
    console.log(cmdOrCtrl.cmdOrCtrl("short"))// ctrl / cmd
    console.log(cmdOrCtrl.cmdOrCtrl("long"))// control / command
    console.log(cmdOrCtrl.cmdOrCtrl("short", "pascal"))// Ctrl / Cmd
    console.log(cmdOrCtrl.cmdOrCtrl("long", "pascal"))// Control / Command
    console.log(cmdOrCtrl._())// alternative of `cmdOrCtrl`, returns `ctrl`
     
    console.log(cmdOrCtrl.os());// returns 'win32' or other os name
    console.log(cmdOrCtrl.os("name"));// returns 'macOS' / 'Linux' / 'Windows' or other os name

    Install

    npm i cmd-or-ctrl

    DownloadsWeekly Downloads

    5

    Version

    0.3.1

    License

    MIT

    Unpacked Size

    5.53 kB

    Total Files

    5

    Last publish

    Collaborators

    • r-q