New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

test-fcm

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

test-fcm

Implementation of firebase cloud messaging based on promises

  • 1.1.12
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

promise-fcm

An implementation of firebase cloud messaging using promises.

Documentation

Installation npm install promise-fcm --save

Function chaining You can more easily chain functions and call now to send the message. Example :

let sender = new FCM('serverKey');
let message = {
	key: value
};
let registrationDeviceId = 'registrationDeviceId'
sender
	.sendTo(registrationDeviceId)
	.withMessage(message)
	.now()
	.then(function (response) {
	  console.log('Request succeeded with status ', response.statusCode);
	  console.log('The response is : ' , response.body);
	})
	.catch(function (err) {
	 console.log(err)
	});

Usage example

let sender = new FCM('serverKey');
let message = {
	to: registrationDeviceId,
	data: {}
}
sender.send(message)
      .then(function (response) {
        console.log('Request succeeded with status ', response.statusCode);
        console.log('The response is : ' , response.body);
      })
      .catch(function (err) {
    	  console.log(err)
      });

Changelog

  • 1.1.0 :
    • Added new methodology , function chaining. Consider use it.
    • send method will print as well the new message about the function chaining methodology.
    • Methods sendTo withMessage withNotification withCollapseKey and now will return inerrarray of errors is exist.

TODO'S

  • Add tests
  • Add retry case
  • Add more docs

Keywords

FAQs

Package last updated on 24 Mar 2017

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