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

@expandorg/app-utils

Package Overview
Dependencies
Maintainers
2
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@expandorg/app-utils - npm Package Compare versions

Comparing version 0.0.27 to 0.0.28

12

app.js

@@ -13,3 +13,10 @@ // @flow

import { refreshSaga, initSaga, userUpdatedSaga } from './src/app/sagas';
import {
refreshSaga,
initSaga,
userUpdatedSaga,
addNotification,
clearNotification,
handldNotificationAdded,
} from './src/app/sagas';

@@ -27,2 +34,5 @@ export {

notificationReducer,
addNotification,
clearNotification,
handldNotificationAdded,
};

4

package.json
{
"name": "@expandorg/app-utils",
"version": "0.0.27",
"version": "0.0.28",
"description": "App utils",

@@ -21,3 +21,3 @@ "main": "index.js",

},
"gitHead": "72bc54067b852f437c34a1cc8847c3003580f44f"
"gitHead": "55182d5b70d01f5904f886c8df903acaf1fbfb6c"
}

@@ -0,1 +1,7 @@

// @flow
import { call, put, take, race } from 'redux-saga/effects';
import { delay } from '@expandorg/utils';
import { appActionTypes, userActionTypes } from './actionTypes';

@@ -17,1 +23,25 @@

});
const NOTIFICATION_TIMEOUT = 3000;
declare type NotificationType = 'error' | 'success' | 'warning' | 'message';
export const addNotification = (type: NotificationType, message: string) => ({
type: appActionTypes.NOTIFICATION_ADD,
payload: { type, message },
});
export const clearNotification = () => ({
type: appActionTypes.NOTIFICATION_REMOVE,
payload: null,
});
export function* handldNotificationAdded() {
const { timeout } = yield race({
timeout: call(delay, NOTIFICATION_TIMEOUT),
clear: take(appActionTypes.NOTIFICATION_REMOVE),
});
if (timeout) {
yield put(clearNotification());
}
}
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