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

pushy

Package Overview
Dependencies
Maintainers
1
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pushy - npm Package Compare versions

Comparing version 2.0.14 to 3.0.0

11

api/push/send.js

@@ -89,13 +89,10 @@ var request = require('request');

// Fetch push notification ID
var pushId = body.id;
// Callback?
if (callback) {
// Pass push ID to callback with a null error
callback(null, pushId);
// Pass response body to callback with a null error
callback(null, body);
}
else {
// Resolve the promise
resolve(pushId);
// Resolve the promise with response body
resolve(body);
}

@@ -102,0 +99,0 @@ });

@@ -26,3 +26,3 @@ // Change to require('pushy') to use this code in your own project

// Send push notification using the Send Notifications API
pushy.sendPushNotification(data, to, options, function (err, id) {
pushy.sendPushNotification(data, to, options, function (err, result) {
// Log errors to console

@@ -34,3 +34,3 @@ if (err) {

// Log success
console.log('Push sent successfully! (ID: ' + id + ')');
console.log('Push sent successfully! (ID: ' + result.id + ')');
});

@@ -37,0 +37,0 @@

{
"name": "pushy",
"version": "2.0.14",
"version": "3.0.0",
"description": "The official Node.js package for sending push notifications with Pushy.",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -45,3 +45,3 @@ # pushy-node

// Send push notification using the Send Notifications API
pushy.sendPushNotification(data, to, options, function (err, id) {
pushy.sendPushNotification(data, to, options, function (err, result) {
// Log errors to console

@@ -53,3 +53,3 @@ if (err) {

// Log success
console.log('Push sent successfully! (ID: ' + id + ')');
console.log('Push sent successfully! (ID: ' + result.id + ')');
});

@@ -66,5 +66,5 @@ ```

pushy.sendPushNotification(data, tokens, options)
.then(function (id) {
.then(function (result) {
// Log success
console.log('Push sent successfully! (ID: ' + id + ')');
console.log('Push sent successfully! (ID: ' + result.id + ')');
}).catch(function (err) {

@@ -85,3 +85,3 @@ // Log errors to console

```js
pushy.sendPushNotification(data, to, options, function (err, id) {
pushy.sendPushNotification(data, to, options, function (err, result) {
// Log errors to console

@@ -93,3 +93,3 @@ if (err) {

// Log success
console.log('Push sent successfully! (ID: ' + id + ')');
console.log('Push sent successfully! (ID: ' + result.id + ')');
});

@@ -96,0 +96,0 @@ ```

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