Socket
Socket
Sign inDemoInstall

rc-notification

Package Overview
Dependencies
11
Maintainers
7
Versions
74
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 5.0.0-alpha.6 to 5.0.0-alpha.7

25

es/useNotification.js
import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";

@@ -13,2 +12,23 @@ import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";

function mergeConfig() {
var clone = {};
for (var _len = arguments.length, objList = new Array(_len), _key = 0; _key < _len; _key++) {
objList[_key] = arguments[_key];
}
objList.forEach(function (obj) {
if (obj) {
Object.keys(obj).forEach(function (key) {
var val = obj[key];
if (val !== undefined) {
clone[key] = val;
}
});
}
});
return clone;
}
export default function useNotification() {

@@ -55,6 +75,5 @@ var rootConfig = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};

var mergedConfig = _objectSpread(_objectSpread(_objectSpread({}, shareConfig), config), {}, {
var mergedConfig = mergeConfig(shareConfig, config, {
key: (_config$key = config.key) !== null && _config$key !== void 0 ? _config$key : Date.now()
});
setTaskQueue(function (queue) {

@@ -61,0 +80,0 @@ return [].concat(_toConsumableArray(queue), [{

@@ -14,4 +14,2 @@ "use strict";

var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));

@@ -31,2 +29,23 @@

function mergeConfig() {
var clone = {};
for (var _len = arguments.length, objList = new Array(_len), _key = 0; _key < _len; _key++) {
objList[_key] = arguments[_key];
}
objList.forEach(function (obj) {
if (obj) {
Object.keys(obj).forEach(function (key) {
var val = obj[key];
if (val !== undefined) {
clone[key] = val;
}
});
}
});
return clone;
}
function useNotification() {

@@ -72,3 +91,3 @@ var rootConfig = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};

var mergedConfig = (0, _objectSpread2.default)((0, _objectSpread2.default)((0, _objectSpread2.default)({}, shareConfig), config), {}, {
var mergedConfig = mergeConfig(shareConfig, config, {
key: (_config$key = config.key) !== null && _config$key !== void 0 ? _config$key : Date.now()

@@ -75,0 +94,0 @@ });

2

package.json
{
"name": "rc-notification",
"version": "5.0.0-alpha.6",
"version": "5.0.0-alpha.7",
"description": "notification ui component for react",

@@ -5,0 +5,0 @@ "engines": {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc