react-push-notification
Advanced tools
Comparing version 1.0.18 to 1.1.0
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 @@ } |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No README
QualityPackage does not have a README. This may indicate a failed publish or a low quality package.
Found 1 instance in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
20920
17
551
0
115
0