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

@pjediny/react-notification

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@pjediny/react-notification - npm Package Compare versions

Comparing version 0.0.7 to 0.0.8

4

dist/actions/notification.js

@@ -41,3 +41,2 @@ (function (global, factory) {

payload: {
id: new Date().getTime(),
type: 'success',

@@ -60,3 +59,2 @@ message: message,

payload: {
id: new Date().getTime(),
type: 'error',

@@ -79,3 +77,2 @@ message: message,

payload: {
id: new Date().getTime(),
type: 'info',

@@ -98,3 +95,2 @@ message: message,

payload: {
id: new Date().getTime(),
type: 'warning',

@@ -101,0 +97,0 @@ message: message,

1

dist/reducers/initState.js

@@ -21,2 +21,3 @@ (function (global, factory) {

notification: {
index: 0,
items: {}

@@ -23,0 +24,0 @@ }

@@ -48,5 +48,8 @@ (function (global, factory) {

var notificationReducer = (0, _redux.createReducer)(_initState2.default.notification, (_createReducer = {}, _defineProperty(_createReducer, _notification2.default.ADD, function (state, payload) {
var newIndex = ++state.index;
var newState = Object.assign({}, state.items);
payload.id = newIndex;
newState[payload.id] = payload;
return Object.assign({}, state, {
index: newIndex,
items: newState

@@ -56,5 +59,3 @@ });

var newState = Object.assign({}, state.items);
console.log(newState);
delete newState[id];
console.log(newState);
return Object.assign({}, state, {

@@ -61,0 +62,0 @@ items: newState

{
"name": "@pjediny/react-notification",
"version": "0.0.7",
"version": "0.0.8",
"description": "React redux notification",
"author": "Pavol Jediny",
"keywords":[
"react",
"notification",
"flash message"
],
"license": "MIT",

@@ -7,0 +12,0 @@ "scripts": {

@@ -7,3 +7,2 @@ import notificationTypes from './../types/notification';

payload: {
id: new Date().getTime(),
type: 'success',

@@ -22,3 +21,2 @@ message,

payload: {
id: new Date().getTime(),
type: 'error',

@@ -37,3 +35,2 @@ message,

payload: {
id: new Date().getTime(),
type: 'info',

@@ -52,3 +49,2 @@ message,

payload: {
id: new Date().getTime(),
type: 'warning',

@@ -55,0 +51,0 @@ message,

export default {
notification: {
index: 0,
items: {}
}
};

@@ -7,5 +7,8 @@ import { createReducer } from './../utils/redux';

[notificationTypes.ADD]: (state, payload) => {
let newIndex = ++state.index;
let newState = Object.assign({}, state.items);
payload.id = newIndex;
newState[payload.id] = payload;
return Object.assign({}, state, {
index: newIndex,
items: newState

@@ -16,5 +19,3 @@ });

let newState = Object.assign({}, state.items);
console.log(newState);
delete newState[id];
console.log(newState);
return Object.assign({}, state, {

@@ -21,0 +22,0 @@ items: newState

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