Socket
Socket
Sign inDemoInstall

custom-filters-js

Package Overview
Dependencies
0
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    custom-filters-js

This class take inspiration of CustomEvent class.


Version published
Maintainers
1
Created

Readme

Source

CustomFilters

This class take inspiration of CustomEvent class.

Installation

npm i custom-filters-js

Methods

constructor( target )

If you want to can add a target, when you call to addFilterListener the target will returned as this.

dispatchFilter

Trigger a previously registered filter.

You can send all the parameters you need, the first parameter will always be the name of the filter.

.dispatchFilter('filterName', p1, p2, p3, ...);

addFilterListener

Register a filter.

.addFilterListener('filterName', function(p1, p2, p3){
	console.log(p1, p2, p3);
});

When the dispatchFilter function is called, addFilterListener will be called using its corresponding filter.

Keywords

FAQs

Last updated on 17 Sep 2020

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc