Comparing version
{ | ||
"name": "saywhen", | ||
"version": "1.0.0", | ||
"version": "1.1.0", | ||
"description": "Better spy fake calls for Jasmine", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -0,1 +1,7 @@ | ||
'use strict'; | ||
(function() { | ||
var root = this; | ||
var previous_when = root.when; | ||
var handlers = []; | ||
@@ -13,2 +19,4 @@ | ||
return val.jasmineMatches.bind(val); | ||
} else if (val && val.asymmetricMatch !== undefined) { | ||
return val.asymmetricMatch.bind(val); | ||
} else { | ||
@@ -159,2 +167,16 @@ return function(arg) { return val === arg }; | ||
module.exports = when; | ||
when.noConflict = function() { | ||
root.when = previous_when; | ||
return when; | ||
} | ||
if (typeof exports !== 'undefined' ) { | ||
if (typeof module !== 'undefined' && module.exports) { | ||
exports = module.exports = when; | ||
} | ||
exports.when = when; | ||
} | ||
else { | ||
root.when = when; | ||
} | ||
}).call(this); |
25857
1.76%362
5.54%