New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

native-msg-box

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

native-msg-box

Make a native msg box appear

Source
npmnpm
Version
0.0.2
Version published
Maintainers
1
Created
Source

native-msg-box

Allows you to display a native MessageBox / Dialog.

By native we mean an OS level, not a browser level dialog.

Example:

var msgbox = require('native-msg-box');
msgbox.prompt({
  msg: "Hunt the Wumpus?",
  title: "Game"
}, function(err, result) {
  switch (result) {
    case msgbox.Result.YES:
      console.log("pressed yes");
      break;
    case msgbox.Result.NO:
      console.log("pressed no");
      break;
  }
});

API:

  • prompt(options, callback)

    options

    msg {string} REQUIRED The message to display

    title {string} optional. Title for dialog (not available on all OSes ... yet?)

    callback

    The callback gets passed an err and a result. At the moment err should always be null. result is one of

    Result.YES
    Result.NO
    

To Do

  • Add more dialog types. For example
    • a single string prompt "Enter Name: ____"
    • other buttons like "Ok", "Cancel"

Keywords

native

FAQs

Package last updated on 22 Jun 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts