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

jmessenger

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jmessenger

A tiny Javascript library to handle messages that carry a payload

  • 0.0.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
decreased by-50%
Maintainers
1
Weekly downloads
 
Created
Source

JMessenger

NPM version Travis CI Test coverage Dependencies status Dev Dependencies status License

NPM install

JMessenger is no longer maintained. Please, use @mobilabs/messenger now.

JMessenger is a tiny Javascript library to handle messages that carry a payload. It is designed to be embedded in another library.

Quick Startup


// Creates the messenger object:
var mess = Messenger('mycustomevent');

// Listens for an event:
mess.on('mycustomevent', function(payload) {
  console.log('fired mycustomevent: ' + payload);
});

// Fires an event:
mess.fire('mycustomevent', 'this is the payload for mycustomevent');

API

Static methods

JMessenger provides a set of static methods. You can use by typing:

JMessenger.noConflict();
Static MethodsDescription
noConflictreturns the JMessenger variable to its previous owner,

Create a JMessenger object:

ConstructorDescription
JMessenger('messagename')creates the JMessenger object that handles 'messagename' messages,

Methods

MethodsDescription
addEventsadds events/messages,
addEventListeneradds an event listener,
removeEventListenerremoves an event listener,
firefires an event/message,
onalias on addEventListener,
offalias on removeEventListener,
triggeralias on fire,

License

MIT.

Keywords

FAQs

Package last updated on 27 Dec 2019

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