Socket
Socket
Sign inDemoInstall

react-interval

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-interval - npm Package Compare versions

Comparing version 2.0.1 to 2.0.2

56

build/react-interval.js

@@ -46,5 +46,2 @@ (function webpackUniversalModuleDefinition(root, factory) {

/******/
/******/ // identity function for calling harmony imports with the correct context
/******/ __webpack_require__.i = function(value) { return value; };
/******/
/******/ // define getter function for harmony exports

@@ -77,3 +74,3 @@ /******/ __webpack_require__.d = function(exports, name, getter) {

/******/ // Load entry module and return exports
/******/ return __webpack_require__(__webpack_require__.s = 1);
/******/ return __webpack_require__(__webpack_require__.s = 0);
/******/ })

@@ -85,18 +82,19 @@ /************************************************************************/

"use strict";
var _require = __webpack_require__(1),
ReactInterval = _require.ReactInterval;
ReactInterval.ReactInterval = ReactInterval;
module.exports = ReactInterval;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.ReactInterval = undefined;
/***/ }),
/* 1 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ReactInterval", function() { return ReactInterval; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(2);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
var _react = __webpack_require__(2);
var _react2 = _interopRequireDefault(_react);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

@@ -108,3 +106,6 @@

var ReactInterval = exports.ReactInterval = function (_React$Component) {
var ReactInterval = function (_React$Component) {
_inherits(ReactInterval, _React$Component);

@@ -134,2 +135,4 @@

_this.timer = null;
}, _this.render = function () {
return false;
}, _temp), _possibleConstructorReturn(_this, _ret);

@@ -172,12 +175,6 @@ }

}
}, {
key: 'render',
value: function render() {
return false;
}
}]);
return ReactInterval;
}(_react2.default.Component);
}(__WEBPACK_IMPORTED_MODULE_0_react___default.a.Component);
ReactInterval.defaultProps = {

@@ -189,15 +186,2 @@ enabled: false,

/***/ }),
/* 1 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var _require = __webpack_require__(0),
ReactInterval = _require.ReactInterval;
ReactInterval.ReactInterval = ReactInterval;
module.exports = ReactInterval;
/***/ }),
/* 2 */

@@ -204,0 +188,0 @@ /***/ (function(module, exports) {

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

!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("React")):"function"==typeof define&&define.amd?define(["React"],t):"object"==typeof exports?exports.ReactInterval=t(require("React")):e.ReactInterval=t(e.React)}(this,function(e){return function(e){function t(o){if(n[o])return n[o].exports;var r=n[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,t),r.l=!0,r.exports}var n={};return t.m=e,t.c=n,t.i=function(e){return e},t.d=function(e,n,o){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:o})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=1)}([function(e,t,n){"use strict";function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function u(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0}),t.ReactInterval=void 0;var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),i=n(2),c=function(e){return e&&e.__esModule?e:{default:e}}(i);(t.ReactInterval=function(e){function t(){var e,n,u,a;o(this,t);for(var i=arguments.length,c=Array(i),l=0;l<i;l++)c[l]=arguments[l];return n=u=r(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(c))),u.callback=function(){u.timer&&(u.props.callback(),u.start())},u.start=function(){u.stop(),u.timer=setTimeout(u.callback,u.props.timeout)},u.stop=function(){clearTimeout(u.timer),u.timer=null},a=n,r(u,a)}return u(t,e),a(t,[{key:"componentDidMount",value:function(){this.props.enabled&&this.start()}},{key:"shouldComponentUpdate",value:function(e){var t=e.timeout,n=e.callback,o=e.enabled;return this.props.timeout!==t||this.props.callback!==n||this.props.enabled!==o}},{key:"componentDidUpdate",value:function(e){var t=e.enabled;this.props.enabled!==t&&(this.props.enabled?this.start():this.stop())}},{key:"componentWillUnmount",value:function(){this.stop()}},{key:"render",value:function(){return!1}}]),t}(c.default.Component)).defaultProps={enabled:!1,timeout:1e3}},function(e,t,n){"use strict";var o=n(0),r=o.ReactInterval;r.ReactInterval=r,e.exports=r},function(t,n){t.exports=e}])});
(function(a,b){'object'==typeof exports&&'object'==typeof module?module.exports=b(require('React')):'function'==typeof define&&define.amd?define(['React'],b):'object'==typeof exports?exports.ReactInterval=b(require('React')):a.ReactInterval=b(a.React)})(this,function(a){return function(a){function b(d){if(c[d])return c[d].exports;var e=c[d]={i:d,l:!1,exports:{}};return a[d].call(e.exports,e,e.exports,b),e.l=!0,e.exports}var c={};return b.m=a,b.c=c,b.d=function(a,c,d){b.o(a,c)||Object.defineProperty(a,c,{configurable:!1,enumerable:!0,get:d})},b.n=function(a){var c=a&&a.__esModule?function(){return a['default']}:function(){return a};return b.d(c,'a',c),c},b.o=function(a,b){return Object.prototype.hasOwnProperty.call(a,b)},b.p='',b(b.s=0)}([function(a,b,c){var d=c(1),e=d.ReactInterval;e.ReactInterval=e,a.exports=e},function(a,b,c){'use strict';function d(a,b){if(!(a instanceof b))throw new TypeError('Cannot call a class as a function')}function e(a,b){if(!a)throw new ReferenceError('this hasn\'t been initialised - super() hasn\'t been called');return b&&('object'==typeof b||'function'==typeof b)?b:a}function f(a,b){if('function'!=typeof b&&null!==b)throw new TypeError('Super expression must either be null or a function, not '+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,'__esModule',{value:!0}),c.d(b,'ReactInterval',function(){return j});var g=c(2);var h=c.n(g);var i=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,'value'in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}();var j=function(a){function b(){var a;var c,f,g;d(this,b);for(var h=arguments.length,i=Array(h),j=0;j<h;j++)i[j]=arguments[j];return g=(c=(f=e(this,(a=b.__proto__||Object.getPrototypeOf(b)).call.apply(a,[this].concat(i))),f),f.callback=function(){f.timer&&(f.props.callback(),f.start())},f.start=function(){f.stop(),f.timer=setTimeout(f.callback,f.props.timeout)},f.stop=function(){clearTimeout(f.timer),f.timer=null},f.render=function(){return!1},c),e(f,g)}return f(b,a),i(b,[{key:'componentDidMount',value:function(){this.props.enabled&&this.start()}},{key:'shouldComponentUpdate',value:function(a){var b=a.timeout,c=a.callback,d=a.enabled;return this.props.timeout!==b||this.props.callback!==c||this.props.enabled!==d}},{key:'componentDidUpdate',value:function(a){var b=a.enabled;this.props.enabled!==b&&(this.props.enabled?this.start():this.stop())}},{key:'componentWillUnmount',value:function(){this.stop()}}]),b}(h.a.Component);j.defaultProps={enabled:!1,timeout:1e3}},function(b){b.exports=a}])});

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

_this.timer = null;
}, _this.render = function () {
return false;
}, _temp), _possibleConstructorReturn(_this, _ret);

@@ -85,7 +87,2 @@ }

}
}, {
key: 'render',
value: function render() {
return false;
}
}]);

@@ -92,0 +89,0 @@

{
"name": "react-interval",
"version": "2.0.1",
"version": "2.0.2",
"description": "Safe React wrapper for setInterval",

@@ -11,3 +11,11 @@ "main": "lib/index.js",

"start": "../../scripts/start.js",
"prepublish": "npm start -s build"
"lint": "../../scripts/lint.js",
"test": "../../scripts/test.js",
"e2e": "../../scripts/e2e.js",
"build": "../../scripts/build.js",
"dist": "../../scripts/dist.js",
"lib": "../../scripts/lib.js",
"pub": "../../scripts/pub.js",
"ghPages": "../../scripts/ghPages.js",
"prepublish": "../../scripts/prepublish.js"
},

@@ -34,6 +42,6 @@ "repository": "https://github.com/nkbt/react-works/tree/master/packages/interval",

"peerDependencies": {
"react": "^15.3.0"
"react": "^15.3.0 || ^16.0.0"
},
"dependencies": {
"prop-types": "^15.5.10"
"prop-types": "^15.6.0"
},

@@ -40,0 +48,0 @@ "files": [

@@ -62,5 +62,3 @@ import React from 'react';

render() {
return false;
}
render = () => false;
}
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