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

react-notification-badge

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-notification-badge - npm Package Compare versions

Comparing version 1.3.0 to 1.3.1

4

CHANGELOG.md
## Change Log
### Ver 1.3.1
* #18 [Support server side rendering](https://github.com/georgeOsdDev/react-notification-badge/issues/18)
### Ver 1.3.0

@@ -4,0 +8,0 @@

29

lib/components/AnimationCounter.js

@@ -9,2 +9,4 @@ 'use strict';

var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
var _react = require('react');

@@ -30,15 +32,26 @@

var defaultSetTimeout = function defaultSetTimeout(callback) {
setTimeout(callback, 1000.0 / 60.0);
};
var defaultClearTimeout = function defaultClearTimeout(timer) {
clearTimeout(timer);
};
var requestAnimationFrame = function () {
return window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.oRequestAnimationFrame || window.msRequestAnimationFrame || function cb(callback) {
window.setTimeout(callback, 1000.0 / 60.0);
};
if (typeof window !== 'undefined') {
return defaultSetTimeout;
} else {
return window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.oRequestAnimationFrame || window.msRequestAnimationFrame || defaultSetTimeout;
}
}();
var cancelAnimationFrame = function () {
return window.cancelAnimationFrame || window.webkitCancelAnimationFrame || window.mozCancelAnimationFrame || window.oCancelAnimationFrame || window.msCancelAnimationFrame || function cb(timer) {
window.clearTimeout(timer);
};
if (typeof window !== 'undefined') {
return defaultClearTimeout;
} else {
return window.cancelAnimationFrame || window.webkitCancelAnimationFrame || window.mozCancelAnimationFrame || window.oCancelAnimationFrame || window.msCancelAnimationFrame || defaultClearTimeout;
}
}();
var now = window.performance && (performance.now || performance.mozNow || performance.msNow || performance.oNow || performance.webkitNow);
var now = (typeof window === 'undefined' ? 'undefined' : _typeof(window)) !== undefined && window.performance && (performance.now || performance.mozNow || performance.msNow || performance.oNow || performance.webkitNow);

@@ -55,3 +68,3 @@ var getTime = function getTime() {

var _this = _possibleConstructorReturn(this, Object.getPrototypeOf(AnimationCounter).call(this, props));
var _this = _possibleConstructorReturn(this, (AnimationCounter.__proto__ || Object.getPrototypeOf(AnimationCounter)).call(this, props));

@@ -58,0 +71,0 @@ _this.state = {};

@@ -61,3 +61,3 @@ 'use strict';

var _this = _possibleConstructorReturn(this, Object.getPrototypeOf(NotificationBadge).call(this, props));
var _this = _possibleConstructorReturn(this, (NotificationBadge.__proto__ || Object.getPrototypeOf(NotificationBadge)).call(this, props));

@@ -64,0 +64,0 @@ _this.state = {};

{
"name": "react-notification-badge",
"version": "1.3.0",
"version": "1.3.1",
"description": "Simple notification badge react component",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

@@ -7,29 +7,43 @@ 'use strict';

const requestAnimationFrame = (() =>
window.requestAnimationFrame ||
window.webkitRequestAnimationFrame ||
window.mozRequestAnimationFrame ||
window.oRequestAnimationFrame ||
window.msRequestAnimationFrame ||
function cb(callback) {
window.setTimeout(callback, 1000.0 / 60.0);
const defaultSetTimeout = (callback) => {
setTimeout(callback, 1000.0 / 60.0)
}
const defaultClearTimeout = (timer) => {
clearTimeout(timer);
}
const requestAnimationFrame = (() => {
if (typeof window !== 'undefined') {
return defaultSetTimeout;
} else {
return window.requestAnimationFrame ||
window.webkitRequestAnimationFrame ||
window.mozRequestAnimationFrame ||
window.oRequestAnimationFrame ||
window.msRequestAnimationFrame ||
defaultSetTimeout;
}
)();
})();
const cancelAnimationFrame = (() =>
window.cancelAnimationFrame ||
window.webkitCancelAnimationFrame ||
window.mozCancelAnimationFrame ||
window.oCancelAnimationFrame ||
window.msCancelAnimationFrame ||
function cb(timer) {
window.clearTimeout(timer);
const cancelAnimationFrame = (() => {
if (typeof window !== 'undefined') {
return defaultClearTimeout;
} else {
return window.cancelAnimationFrame ||
window.webkitCancelAnimationFrame ||
window.mozCancelAnimationFrame ||
window.oCancelAnimationFrame ||
window.msCancelAnimationFrame ||
defaultClearTimeout;
}
)();
})();
const now = window.performance && (performance.now ||
performance.mozNow ||
performance.msNow ||
performance.oNow ||
performance.webkitNow);
const now = typeof window !== undefined &&
window.performance && (
performance.now ||
performance.mozNow ||
performance.msNow ||
performance.oNow ||
performance.webkitNow
);

@@ -36,0 +50,0 @@ const getTime = () => (now && now.call(performance)) || Date.now();

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