Security News
pnpm 10.0.0 Blocks Lifecycle Scripts by Default
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
electron-api-docs
Advanced tools
Electron's API documentation in a structured JSON format.
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.
This module exports structured API data in a few different formats. Choose the one that works best for your use case:
To access the docs as a big object tree:
const apis = require('electron-api-docs/tree')
This gives you an object with keys for easy traversal:
apis.BrowserWindow.instanceMethods.setAspectRatio
To access the docs as an array of API objects:
const apis = require('electron-api-docs/electron-api.json')
This gives you an array of API objects, 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)
For the best of both worlds (arrays and objects), you can require the module as a keyed array:
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)
npm install
npm test
MIT
FAQs
Electron's API documentation in a structured JSON format
The npm package electron-api-docs receives a total of 22 weekly downloads. As such, electron-api-docs popularity was classified as not popular.
We found that electron-api-docs demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
Product
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.
Research
Security News
Socket researchers have discovered multiple malicious npm packages targeting Solana private keys, abusing Gmail to exfiltrate the data and drain Solana wallets.