🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Sign inDemoInstall
Socket

electron-menu

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

electron-menu

Convenience module to build Electron menus.

1.0.0
latest
Source
npm
Version published
Maintainers
1
Created
Source

electron-menu

npm travis standard

Convenience module to build Electron menus templates.

Install

npm install --save electron-menu

Usage

converts this:

const em = require('electron-menu')

const menu = em(['Coins', [
  ['Bitcoin', bitcoinClick],
  ['Litecoin', litecoinClick],
  ['Tokens', [
    ['Omni', omniClick],
    ['Counterparty', 'Cmd+H', bitcoinClick],
    '-',
    ['Example role', 'hide']
  ]]
]])

to

{
  label: 'Coins',
  submenu: [
    { label: 'Bitcoin', click: bitcoinClick },
    { label: 'Litecoin', click: litecoinClick },
    { label: 'Tokens', submenu: [
      { label: 'Omni', click: omniClick },
      { label: 'Counterparty', accelerator: 'Cmd+H', click: bitcoinClick },
      { type: 'separator' },
      { label: 'Example role', role: 'hide' }
    ]}
  ]
}

License

Copyright JP Richardson

MIT

Keywords

electron

FAQs

Package last updated on 24 Oct 2016

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