🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

electron-api-docs

Package Overview
Dependencies
Maintainers
1
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

electron-api-docs

Electron's API documentation in a structured JSON format

1.4.4
Source
npm
Version published
Weekly downloads
8
-84.31%
Maintainers
1
Weekly downloads
 
Created
Source

electron-api-docs Build Status

Electron's API documentation in a structured JSON format.

Installation

npm install electron-api-docs --save

Or take it for a spin in your Node.js REPL:

npm i -g trymodule && trymodule electron-api-docs=apis

Note: This package is not semantically versioned. It is published in step with Electron. When you install electron-api-docs@1.4.1, you're getting the API docs from Electron v1.4.1.

Usage

const apis = require('electron-api-docs')

When you require it, you get an array of API objects

apis.length
// => 33

The array has a key for each API name, for convenient access:

apis.BrowserWindow
apis.BrowserWindow.staticMethods.getAllWindows.description
apis.WebContents.instanceMethods.savePage.parameters.saveType.possibleValues
apis.app.events.quit

All of the arrays have named keys, but they're still actually arrays, so functional methods like find, map, filter, and every can be used:

apis.find(api => api.name === 'BrowserWindow')

apis.filter(api => api.type === 'Class')

apis.filter(api => api.type === 'Module')

apis.map(api => api.name)

// All arrays have named keys, not just the top-level array!
apis.BrowserWindow.instanceMethods.map(method => method.name)

Tests

npm install
npm test

Dependencies

  • keyed-array: Recursively add named keys to arrays of objects

Dev Dependencies

  • chai: BDD/TDD assertion library for node.js and the browser. Test framework agnostic.
  • gh-latest-release: Get the latest published full release for the Github repository
  • json: a 'json' command for massaging and processing JSON on the command line
  • mocha: simple, flexible, fun test framework
  • standard: JavaScript Standard Style
  • standard-markdown: Test your Markdown files for Standard JavaScript Style™

License

MIT

Keywords

electron

FAQs

Package last updated on 20 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