Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

fin-hypergrid-event-logger

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fin-hypergrid-event-logger

Hypegrid starlog plug-in

  • 1.0.4
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
4
increased by100%
Maintainers
1
Weekly downloads
 
Created
Source

Hypegrid starlog plug-in

Summary

Adds an event logger to your Hypergrid application for debugging purposes.

Synopsis

1. Installing the plugin
var Hypergrid = require('fin-hypergrid');
var eventLoggerPlugin = require('fin-hypergrid-event-logger')

// Shared plugin: Install on the prototype:
Hypergrid.prototype.installPlugins(eventLoggerPlugin);
// The plugin is now available to all existing and new grid instances

// Instance plugin: Install on the instance (available to this instance only):
var grid = new Hypergrid;
grid.installPlugins(eventLoggerPlugin);

// or in one step:
var grid = new Hypergrid({ plugins: eventLoggerPlugin });

NOTE: In actual practice you would want to wait for the DOM to finish loading before instantiating a grid.

2. Starting and stopping event logging
myGrid.logStart(); // event signals are now being logged (to the console by default)
...
myGrid.logStop(); // events are no longer logged

Description

Adds logStart() and logStop() methods to Hypergrid.prototype similar to the starlog methods of the same names except that:

  • The StarLog constructor is called automatically when this logStart is called with a starlog options object.
  • This logStart adds some default option values directing starlog to:
    • Search grid instance for event strings
    • Blacklist the fin-tick event string
    • Attach logging listeners to the canvas element

The default search pattern looks for calls to dispatchEvent and CustomEvent. The search currently yields 29 events. Of these, 18 have custom listeners that log specific information; the rest use the default listener that logs only the event name.

Installation options

methodPrefix is the only installation option. It overrides the default method name prefix (log).

Hypergrid.prototype.installPlugins([eventLoggerPlugin, 'starlog_']);

The above installs the methods starlog_start() and starlog_stop() instead of the default logStart() and logStop().

Loading the plug-in

See the Loading Modules wiki.

FAQs

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

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