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

react-push-notification

Package Overview
Dependencies
Maintainers
1
Versions
33
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-push-notification - npm Package Compare versions

Comparing version 1.0.18 to 1.1.0

README.md

7

dist/index.d.ts
import Notifications from './notifications/Notifications';
import Storage from './notifications/Storage';
export { Notifications, Storage };
import { Options } from './notifications/Storage';
import PushNotification from './notifications/PushNotification';
declare const addNotification: (options: Options) => void;
export { Notifications, PushNotification };
export default addNotification;

@@ -9,2 +9,5 @@ "use strict";

const Storage_1 = __importDefault(require("./notifications/Storage"));
exports.Storage = Storage_1.default;
const PushNotification_1 = __importDefault(require("./notifications/PushNotification"));
exports.PushNotification = PushNotification_1.default;
const addNotification = Storage_1.default.addNotification;
exports.default = addNotification;

@@ -10,3 +10,3 @@ export declare type Color = 'light' | 'darkblue' | 'red' | undefined;

}
interface Options {
export interface Options {
title: string;

@@ -21,3 +21,2 @@ subtitle?: string;

Listener: (storage: any) => void;
notifyListeners: () => void;
popAndPush: (NotificationId: number) => void;

@@ -24,0 +23,0 @@ setTimer: (NotificationId: number, duration: number) => void;

@@ -18,5 +18,2 @@ "use strict";

this.Listener = () => this.Storage;
this.notifyListeners = () => {
this.Listener(this.Storage);
};
this.popAndPush = (NotificationId) => {

@@ -32,3 +29,3 @@ let i = 0;

}
this.notifyListeners();
this.Listener(this.Storage);
};

@@ -46,3 +43,3 @@ this.setTimer = (NotificationId, duration) => {

this.setTimer(newNotification.id, duration || defaultDuration);
this.notifyListeners();
this.Listener(this.Storage);
};

@@ -49,0 +46,0 @@ }

{
"name": "react-push-notification",
"version": "1.0.18",
"version": "1.1.0",
"description": "React push notifications",

@@ -22,5 +22,6 @@ "main": "dist/index.js",

"repository": {
"type": "git"
"type": "git",
"url": "https://github.com/fabioshub/react-push-notification"
},
"author": "Fabio de Bruijn <fabiodebruijn@gmail.com>"
}
import Notifications from './notifications/Notifications';
import Storage from './notifications/Storage';
import Storage, { Options } from './notifications/Storage';
import PushNotification from './notifications/PushNotification';
export { Notifications, Storage };
const addNotification: (options: Options) => void = Storage.addNotification;
export { Notifications, PushNotification };
export default addNotification;

@@ -21,3 +21,3 @@

interface Options {
export interface Options {
title: string;

@@ -35,6 +35,2 @@ subtitle?: string;

notifyListeners = (): void => {
this.Listener(this.Storage);
};
popAndPush = (NotificationId: number) => {

@@ -50,3 +46,3 @@ let i: number = 0;

}
this.notifyListeners();
this.Listener(this.Storage);
};

@@ -67,3 +63,3 @@

this.setTimer(newNotification.id, duration || defaultDuration);
this.notifyListeners();
this.Listener(this.Storage);
};

@@ -70,0 +66,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