Comparing version 0.4.3 to 0.4.4
@@ -7,3 +7,3 @@ (function (global, factory) { | ||
var version = "0.4.3"; | ||
var version = "0.4.4"; | ||
@@ -20,3 +20,5 @@ var frame = 0; | ||
var clock = typeof performance === "object" ? performance : Date; | ||
var setFrame = typeof requestAnimationFrame === "function" ? requestAnimationFrame : function(callback) { return setTimeout(callback, 17); }; | ||
var setFrame = typeof requestAnimationFrame === "function" | ||
? (clock === Date ? function(f) { requestAnimationFrame(function() { f(clock.now()); }); } : requestAnimationFrame) | ||
: function(f) { setTimeout(f, 17); }; | ||
function now() { | ||
@@ -23,0 +25,0 @@ return clockNow || (setFrame(clearNow), clockNow = clock.now() + clockSkew); |
@@ -1,1 +0,1 @@ | ||
!function(t,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n(t.d3_timer=t.d3_timer||{})}(this,function(t){"use strict";function n(){return w||(F(e),w=b.now()+T)}function e(){w=0}function i(){this._call=this._time=this._next=null}function r(t,n,e){var r=new i;return r.restart(t,n,e),r}function o(){n(),++h;for(var t,e=m;e;)(t=w-e._time)>=0&&e._call.call(null,t),e=e._next;--h}function u(t){w=(d=t||b.now())+T,h=v=0;try{o()}finally{h=0,c(),w=0}}function l(){var t=b.now(),n=t-d;n>y&&(T-=n,d=t)}function c(){for(var t,n=m,e=1/0;n;)n._call?(e>n._time&&(e=n._time),n=(t=n)._next):n=t?t._next=n._next:m=n._next;_=t,f(e)}function f(t){if(!h){v&&(v=clearTimeout(v));var n=t-w;n>24?(1/0>t&&(v=setTimeout(u,n)),x&&(x=clearInterval(x))):(x||(x=setInterval(l,y)),h=1,F(u))}}function a(t,n,e){var r=new i;return n=null==n?0:+n,r.restart(function(e){r.stop(),t(e+n)},n,e),r}function s(t,e,r){var o=new i,u=e;return null==e?(o.restart(t,e,r),o):(e=+e,r=null==r?n():+r,o.restart(function l(n){n+=u,o.restart(l,u+=e,r),t(n)},e,r),o)}var m,_,p="0.4.3",h=0,v=0,x=0,y=1e3,d=0,w=0,T=0,b="object"==typeof performance?performance:Date,F="function"==typeof requestAnimationFrame?requestAnimationFrame:function(t){return setTimeout(t,17)};i.prototype=r.prototype={constructor:i,restart:function(t,e,i){if("function"!=typeof t)throw new TypeError("callback is not a function");i=(null==i?n():+i)+(null==e?0:+e),this._next||_===this||(_?_._next=this:m=this,_=this),this._call=t,this._time=i,f()},stop:function(){this._call&&(this._call=null,this._time=1/0,f())}},t.version=p,t.now=n,t.timer=r,t.timerFlush=o,t.timeout=a,t.interval=s}); | ||
!function(t,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n(t.d3_timer=t.d3_timer||{})}(this,function(t){"use strict";function n(){return d||(b(e),d=T.now()+F)}function e(){d=0}function i(){this._call=this._time=this._next=null}function o(t,n,e){var o=new i;return o.restart(t,n,e),o}function r(){n(),++h;for(var t,e=m;e;)(t=d-e._time)>=0&&e._call.call(null,t),e=e._next;--h}function u(t){d=(w=t||T.now())+F,h=v=0;try{r()}finally{h=0,a(),d=0}}function c(){var t=T.now(),n=t-w;n>y&&(F-=n,w=t)}function a(){for(var t,n=m,e=1/0;n;)n._call?(e>n._time&&(e=n._time),n=(t=n)._next):n=t?t._next=n._next:m=n._next;_=t,f(e)}function f(t){if(!h){v&&(v=clearTimeout(v));var n=t-d;n>24?(1/0>t&&(v=setTimeout(u,n)),x&&(x=clearInterval(x))):(x||(x=setInterval(c,y)),h=1,b(u))}}function l(t,n,e){var o=new i;return n=null==n?0:+n,o.restart(function(e){o.stop(),t(e+n)},n,e),o}function s(t,e,o){var r=new i,u=e;return null==e?(r.restart(t,e,o),r):(e=+e,o=null==o?n():+o,r.restart(function c(n){n+=u,r.restart(c,u+=e,o),t(n)},e,o),r)}var m,_,p="0.4.4",h=0,v=0,x=0,y=1e3,w=0,d=0,F=0,T="object"==typeof performance?performance:Date,b="function"==typeof requestAnimationFrame?T===Date?function(t){requestAnimationFrame(function(){t(T.now())})}:requestAnimationFrame:function(t){setTimeout(t,17)};i.prototype=o.prototype={constructor:i,restart:function(t,e,i){if("function"!=typeof t)throw new TypeError("callback is not a function");i=(null==i?n():+i)+(null==e?0:+e),this._next||_===this||(_?_._next=this:m=this,_=this),this._call=t,this._time=i,f()},stop:function(){this._call&&(this._call=null,this._time=1/0,f())}},t.version=p,t.now=n,t.timer=o,t.timerFlush=r,t.timeout=l,t.interval=s}); |
export var name = "d3-timer"; | ||
export var version = "0.4.3"; | ||
export var version = "0.4.4"; | ||
export var description = "An efficient queue capable of managing thousands of concurrent animations."; | ||
@@ -11,2 +11,2 @@ export var keywords = ["d3","timer","transition","animation","requestAnimationFrame","setTimeout","setInterval"]; | ||
export var scripts = {"pretest":"rm -rf build && mkdir build && json2module package.json > build/package.js && rollup -f umd -n d3_timer -o build/d3-timer.js -- index.js","test":"tape 'test/**/*-test.js' && eslint index.js src","prepublish":"npm run test && uglifyjs build/d3-timer.js -c -m -o build/d3-timer.min.js","postpublish":"VERSION=`node -e 'console.log(require(\"./package.json\").version)'`; git push && git push --tags && cp build/d3-timer.js ../d3.github.com/d3-timer.v0.4.js && cp build/d3-timer.min.js ../d3.github.com/d3-timer.v0.4.min.js && cd ../d3.github.com && git add d3-timer.v0.4.js d3-timer.v0.4.min.js && git commit -m \"d3-timer ${VERSION}\" && git push && cd - && zip -j build/d3-timer.zip -- LICENSE README.md build/d3-timer.js build/d3-timer.min.js"}; | ||
export var devDependencies = {"json2module":"0.0","rollup":"0.25","tape":"4","uglify-js":"2"}; | ||
export var devDependencies = {"json2module":"0.0","rollup":"0.26","tape":"4","uglify-js":"2"}; |
{ | ||
"name": "d3-timer", | ||
"version": "0.4.3", | ||
"version": "0.4.4", | ||
"description": "An efficient queue capable of managing thousands of concurrent animations.", | ||
@@ -34,3 +34,3 @@ "keywords": [ | ||
"json2module": "0.0", | ||
"rollup": "0.25", | ||
"rollup": "0.26", | ||
"tape": "4", | ||
@@ -37,0 +37,0 @@ "uglify-js": "2" |
@@ -11,3 +11,5 @@ var frame = 0, // is an animation frame pending? | ||
clock = typeof performance === "object" ? performance : Date, | ||
setFrame = typeof requestAnimationFrame === "function" ? requestAnimationFrame : function(callback) { return setTimeout(callback, 17); }; | ||
setFrame = typeof requestAnimationFrame === "function" | ||
? (clock === Date ? function(f) { requestAnimationFrame(function() { f(clock.now()); }); } : requestAnimationFrame) | ||
: function(f) { setTimeout(f, 17); }; | ||
@@ -14,0 +16,0 @@ export function now() { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
19569
283