Comparing version 1.1.3 to 1.1.4
{ | ||
"name": "animframe", | ||
"version": "1.1.3", | ||
"version": "1.1.4", | ||
"homepage": "https://github.com/freezedev/animframe", | ||
@@ -21,3 +21,6 @@ "authors": [ | ||
"test", | ||
"tests" | ||
"tests", | ||
"src", | ||
"udefine", | ||
"gruntfile.coffee" | ||
], | ||
@@ -28,5 +31,5 @@ "dependencies": { | ||
"devDependencies": { | ||
"mocha": "*", | ||
"chai": "*" | ||
"mocha": "~1.13.0", | ||
"chai": "~1.8.0" | ||
} | ||
} |
(function() { | ||
(function(name) { | ||
return udefine.configure(function(root) { | ||
return udefine.inject.add(name); | ||
}); | ||
if (typeof performance === "undefined" || performance === null) { | ||
return udefine.configure(function(root) { | ||
return udefine.inject.add(name); | ||
}); | ||
} | ||
})('performance'); | ||
@@ -7,0 +9,0 @@ |
@@ -1,2 +0,2 @@ | ||
/*! animframe - v1.1.2 - 30-09-2013 */ | ||
!function(){!function(a){return udefine.configure(function(){return udefine.inject.add(a)})}("performance"),function(a){return udefine.configure(function(b){var c,d,e;for(d=0,e=a.length;e>d;d++)c=a[d],udefine.inject.add([c.toLowerCase()],{root:b,name:c});return null})}(["requestAnimationFrame","cancelAnimationFrame"])}.call(this),function(){udefine("performance",["root"],function(a){var b,c,d,e,f;if(b=a.performance||{},c=["ms","moz","webkit","o"],!b.now)for(e=0,f=c.length;f>e&&(d=c[e],b.now=b[""+d+"Now"],!b.now);e++);return b.now||(b.now=function(){return("function"==typeof Date.now?Date.now():void 0)||(new Date).getTime()}),b})}.call(this),function(){var a;a=["ms","moz","webkit","o"],udefine("requestanimationframe",["root","performance"],function(b,c){var d,e,f,g,h;if(e=b.requestAnimationFrame,!e)for(g=0,h=a.length;h>g&&(f=a[g],!(e=b[""+f+"RequestAnimationFrame"]));g++);return e||(d=0,e=function(a){var e,f,g;return e=c.now(),g=Math.max(0,16-(e-d)),f=b.setTimeout(function(){return a(e+g)},g),d=e+g,f}),e}),udefine("cancelanimationframe",["root"],function(b){var c,d,e,f;if(c=b.cancelAnimationFrame,!c)for(e=0,f=a.length;f>e&&(d=a[e],!(c=b[""+d+"CancelAnimationFrame"]||b[""+d+"CancelRequestAnimationFrame"]));e++);return c||(c=function(a){return b.clearTimeout(a)}),c})}.call(this); | ||
/*! animframe - v1.1.4 - 17-11-2013 */ | ||
(function(){!function(a){return"undefined"==typeof performance||null===performance?udefine.configure(function(){return udefine.inject.add(a)}):void 0}("performance"),function(a){return udefine.configure(function(b){var c,d,e;for(d=0,e=a.length;e>d;d++)c=a[d],udefine.inject.add([c.toLowerCase()],{root:b,name:c});return null})}(["requestAnimationFrame","cancelAnimationFrame"])}).call(this),function(){udefine("performance",["root"],function(a){var b,c,d,e,f;if(b=a.performance||{},c=["ms","moz","webkit","o"],!b.now)for(e=0,f=c.length;f>e&&(d=c[e],b.now=b[""+d+"Now"],!b.now);e++);return b.now||(b.now=function(){return("function"==typeof Date.now?Date.now():void 0)||(new Date).getTime()}),b})}.call(this),function(){var a;a=["ms","moz","webkit","o"],udefine("requestanimationframe",["root","performance"],function(b,c){var d,e,f,g,h;if(e=b.requestAnimationFrame,!e)for(g=0,h=a.length;h>g&&(f=a[g],!(e=b[""+f+"RequestAnimationFrame"]));g++);return e||(d=0,e=function(a){var e,f,g;return e=c.now(),g=Math.max(0,16-(e-d)),f=b.setTimeout(function(){return a(e+g)},g),d=e+g,f}),e}),udefine("cancelanimationframe",["root"],function(b){var c,d,e,f;if(c=b.cancelAnimationFrame,!c)for(e=0,f=a.length;f>e&&(d=a[e],!(c=b[""+d+"CancelAnimationFrame"]||b[""+d+"CancelRequestAnimationFrame"]));e++);return c||(c=function(a){return b.clearTimeout(a)}),c})}.call(this); |
{ | ||
"name": "animframe", | ||
"version": "1.1.3", | ||
"version": "1.1.4", | ||
"dependencies": { | ||
@@ -9,9 +9,9 @@ "udefine": "~0.8.2" | ||
"grunt": "0.4.x", | ||
"grunt-coffeelint": "*", | ||
"grunt-contrib-uglify": "*", | ||
"grunt-contrib-coffee": "*", | ||
"grunt-mocha": "*", | ||
"grunt-templater": "*", | ||
"matchdep": "*", | ||
"handlebars": "*" | ||
"grunt-coffeelint": "~0.0.7", | ||
"grunt-contrib-uglify": "~0.2.7", | ||
"grunt-contrib-coffee": "~0.7.0", | ||
"grunt-mocha": "~0.4.1", | ||
"grunt-templater": "~0.0.4", | ||
"matchdep": "~0.3.0", | ||
"handlebars": "~1.1.2" | ||
}, | ||
@@ -18,0 +18,0 @@ "scripts": { |
(function() { | ||
var cancelAnimationFrame, chai, expect, requestAnimationFrame, udefine; | ||
var cancelAnimationFrame, chai, expect, performance, requestAnimationFrame, udefine; | ||
@@ -8,4 +8,14 @@ udefine = window.udefine, chai = window.chai; | ||
requestAnimationFrame = window.requestAnimationFrame, cancelAnimationFrame = window.cancelAnimationFrame; | ||
requestAnimationFrame = window.requestAnimationFrame, cancelAnimationFrame = window.cancelAnimationFrame, performance = window.performance; | ||
describe('performance', function() { | ||
it('performance is an object', function() { | ||
return expect(performance).to.be.a('object'); | ||
}); | ||
return it('performance.now is a function', function() { | ||
expect(performance).to.have.property('now'); | ||
return expect(performance.now).to.be.a('function'); | ||
}); | ||
}); | ||
describe('Animationframe', function() { | ||
@@ -12,0 +22,0 @@ it('requestAnimationFrame is available', function() { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
16424
170