Socket
Book a DemoInstallSign in
Socket

notifier-client

Package Overview
Dependencies
Maintainers
2
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

notifier-client

Client for notifier or notifier-server

1.0.0-rc2
latest
Source
npmnpm
Version published
Weekly downloads
6
100%
Maintainers
2
Weekly downloads
 
Created
Source

notifier-client

Simple client for https://github.com/DemocracyOS/notifier, forked from likeastore

Usage

Install from npm,

$ npm install notifier-client

Initialize the client,

var notifier = require('notifier-client')({
	host: 'http://notifier.example.com/api/events',
	token: 'your-custom-token'
});

Use the notify method,

notifier.notify({
	event: 'user-resistered',
	user: 'a@a.com',
	data: {registered: new Date() }
}, function () {
	// notified!
});

Or use to and withData methods,

notifier.notify('user-registered')
	.to('a@a.com')
	.withData({registered: new Date() })
	.send(function () {
		// notified!
	});

In both cases callback parameter is optional,

notifier.notify({
	event: 'user-resistered',
	user: 'a@a.com',
	data: {registered: new Date() });

// or

notifier.notify('user-registered')
	.to('a@a.com')
	.withData({registered: new Date() })
	.send();

TODOS

  • Tests

License

MIT

Keywords

client

FAQs

Package last updated on 31 Jul 2015

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

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.