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

hyper-plugin-extend

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hyper-plugin-extend

Allows hyper plugins to integrate with each other.

latest
Source
npmnpm
Version
1.1.1
Version published
Weekly downloads
3
200%
Maintainers
1
Weekly downloads
 
Created
Source

hyper-plugin-extend

Allows hyper plugins to integrate with each other.

Usage

Place the following in the main JavaScript file for each sub-plugin:

var registerSubPlugin = require('hyper-plugin-extend').registerSubPlugin;
var SomePluginClass = require('./somePluginClass.js').SomePluginClass;
exports.onRendererWindow = registerSubPlugin('<SOME PLUGIN NAME>', SomePluginClass, /* Optionally, you can place a callback here that is executed after plugin registration. */);

Place the following in the main JavaScript file for the parent plugin:

var registerParentPlugin = require('hyper-plugin-extend').registerParentPlugin;
exports.onRendererWindow = registerParentPlugin('<SOME PLUGIN NAME>', PluginClass => { /* do something */ })

To access a list of all loaded sub-plugins later, do the following:

var getSubPlugins = require('hyper-plugin-extend').getSubPlugins
getSubPlugins('<SOME PLUGIN NAME>', /* You can pass in the renderer window here. Otherwise, it's assumed to be 'window' in the global scope. */) // This returns an array of plugin classes

getSubPlugins relies on the renderer window.

Keywords

hyper

FAQs

Package last updated on 30 May 2018

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