New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

menus

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

menus - npm Package Compare versions

Comparing version 0.0.0 to 0.1.0

1

index.js

@@ -28,3 +28,2 @@ 'use strict'

} = this.options
console.log(this.options)
// hide dock icon

@@ -31,0 +30,0 @@ if (app.dock && !showDockIcon) app.dock.hide()

13

package.json
{
"name": "menus",
"version": "0.0.0",
"version": "0.1.0",
"description": "Menus app using Electron",

@@ -16,3 +16,3 @@ "license": "MIT",

"scripts": {
"test": "jest && eslint *.js",
"test": "eslint *.js",
"dev": "electron ./example/index.js"

@@ -25,3 +25,4 @@ },

"keywords": [
""
"electron",
"menubar"
],

@@ -31,8 +32,4 @@ "devDependencies": {

"eslint": "latest",
"eslint-config-egoist": "latest",
"jest-cli": "^15.1.1"
"eslint-config-egoist": "latest"
},
"jest": {
"testEnvironment": "node"
},
"eslintConfig": {

@@ -39,0 +36,0 @@ "extends": "egoist/esnext"

@@ -1,5 +0,7 @@

# menus
# menus [![NPM version](https://img.shields.io/npm/v/menus.svg?style=flat-square)](https://npmjs.com/package/menus) [![NPM downloads](https://img.shields.io/npm/dm/menus.svg?style=flat-square)](https://npmjs.com/package/menus)
[![NPM version](https://img.shields.io/npm/v/menus.svg?style=flat-square)](https://npmjs.com/package/menus) [![NPM downloads](https://img.shields.io/npm/dm/menus.svg?style=flat-square)](https://npmjs.com/package/menus) [![Build Status](https://img.shields.io/circleci/project/egoist/menus/master.svg?style=flat-square)](https://circleci.com/gh/egoist/menus)
A short-hand for you to build something like:
<img src="./media/preview.png" width="400" alt="preview">
## Install

@@ -14,27 +16,68 @@

```js
const menus = require('menus')
const Menus = require('menus')
menus('unicorns')
//=> 'unicorns & rainbows'
const menus = new Menus()
menus.setMenu([
{
label: 'My First Menu Item',
click() {
console.log('clicked!')
}
}
])
menus.start()
menus.on('ready', () => {
console.log('Menus app is ready!')
})
```
For a more complete example, please check out [example]('./example/index.js').
## API
### menus(input, [options])
### new Menus([options])
#### input
```js
const menus = new Menus()
```
Type: `string`
#### options.icon
Lorem ipsum.
Path to tray icon.
#### options
#### options.showDockIcon
##### foo
Type: `boolean`
Default: `false`
Lorem ipsum.
Whether to show dock icon.
#### options.tooltip
Default: `''`
The tooltip to show when tray icon is hovered.
### menus.on('ready')
Emitted when a tray is created on the menubar.
### menus.setMenu(menu)
Set context menu for the tray icon. The doc of menu is [here](https://github.com/electron/electron/blob/master/docs/api/menu.md).
### menus.start()
Bootstrap the menus app.
### menus.app
The electron.app instance.
### menus.tray
The created tray instance.
## Contributing

@@ -41,0 +84,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc