Socket
Socket
Sign inDemoInstall

react-timer-hoc

Package Overview
Dependencies
21
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.1.0 to 2.2.0

yarn.lock

10

CHANGELOG.md

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

<a name="2.2.0"></a>
# [2.2.0](https://github.com/troch/react-timer-hoc/compare/v2.1.0...v2.2.0) (2017-07-15)
### Features
* add timestamp property on timer prop (tick timestamp) [@MilllerTime](https://github.com/MilllerTime) ([299970c](https://github.com/troch/react-timer-hoc/commit/299970c))
<a name="2.0.1"></a>

@@ -2,0 +12,0 @@ ## [2.0.1](https://github.com/troch/react-timer-hoc/compare/v2.0.0...v2.0.1) (2015-12-08)

13

dist/commonjs/timer.js

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

_this.delay = delay;
_this.state = { tick: 0 };
_this.state = { tick: 0, timestamp: Date.now() };

@@ -83,3 +83,6 @@ _this.synchronizeWith = props.synchronizeWith;

if (!_this2.stopped) _this2.setTimeout();
_this2.setState({ tick: _this2.state.tick + 1 });
_this2.setState({
tick: _this2.state.tick + 1,
timestamp: Date.now()
});
}, duration);

@@ -137,6 +140,8 @@ })

setDelay = this.setDelay;
var tick = this.state.tick;
var _state = this.state,
tick = _state.tick,
timestamp = _state.timestamp;
var timer = { delay: delay, tick: tick, stop: stop, resume: resume, setDelay: setDelay };
var timer = { delay: delay, tick: tick, timestamp: timestamp, stop: stop, resume: resume, setDelay: setDelay };

@@ -143,0 +148,0 @@ return _react2.default.createElement(TimedComponent, _extends({}, props, { timer: timer }));

@@ -111,3 +111,3 @@ (function (global, factory) {

_this.delay = delay;
_this.state = { tick: 0 };
_this.state = { tick: 0, timestamp: Date.now() };

@@ -146,3 +146,6 @@ _this.synchronizeWith = props.synchronizeWith;

if (!_this2.stopped) _this2.setTimeout();
_this2.setState({ tick: _this2.state.tick + 1 });
_this2.setState({
tick: _this2.state.tick + 1,
timestamp: Date.now()
});
}, duration);

@@ -200,6 +203,8 @@ })

setDelay = this.setDelay;
var tick = this.state.tick;
var _state = this.state,
tick = _state.tick,
timestamp = _state.timestamp;
var timer = { delay: delay, tick: tick, stop: stop, resume: resume, setDelay: setDelay };
var timer = { delay: delay, tick: tick, timestamp: timestamp, stop: stop, resume: resume, setDelay: setDelay };

@@ -206,0 +211,0 @@ return _react2.default.createElement(TimedComponent, _extends({}, props, { timer: timer }));

{
"name": "react-timer-hoc",
"version": "2.1.0",
"version": "2.2.0",
"description": "A React timer higher-order component",

@@ -12,3 +12,3 @@ "main": "dist/commonjs/timer.js",

"build": "npm run lint && npm run build:cjs && npm run build:umd",
"clog": "conventional-changelog -p angular -i CHANGELOG.md -w"
"clog": "conventional-changelog -p angular -i CHANGELOG.md -s"
},

@@ -34,3 +34,4 @@ "repository": {

"devDependencies": {
"babel-core": "~6.24.1",
"babel-cli": "~6.24.1",
"babel-core": "~6.25.0",
"babel-eslint": "~7.2.3",

@@ -41,19 +42,22 @@ "babel-plugin-transform-es2015-modules-umd": "~6.24.1",

"babel-preset-es2015": "~6.24.1",
"chai": "~3.5.0",
"chai": "~4.1.0",
"conventional-changelog": "~1.1.3",
"eslint": "~3.19.0",
"eslint": "~4.2.0",
"eslint-config-recommended": "~1.5.0",
"jsdom": "~10.1.0",
"mocha": "~3.3.0",
"react-addons-test-utils": "~15.5.1",
"react-dom": "^15.5.4",
"jsdom": "~11.1.0",
"mocha": "~3.4.2",
"react": "~15.6.1",
"react-addons-test-utils": "~15.6.0",
"react-dom": "^15.6.1",
"react-hyperscript": "~3.0.0",
"sinon": "~2.2.0",
"sinon-chai": "~2.10.0"
"sinon": "~2.3.8",
"sinon-chai": "~2.11.0"
},
"dependencies": {
"invariant": "~2.2.2",
"prop-types": "~15.5.8",
"react": "^15.5.4"
"prop-types": "^15.5.10"
},
"peerDependencies": {
"react": "^15.6.1"
}
}
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