Comparing version 1.1.0 to 1.2.0
16
index.js
@@ -18,3 +18,3 @@ var util = require('util'); | ||
return function(str, options) { | ||
var width = function(str, options) { | ||
options = extend({ | ||
@@ -44,6 +44,14 @@ style: 'normal', | ||
}; | ||
width.supported = true; | ||
return width; | ||
}; | ||
module.exports = supported() ? initialize() : function() { | ||
return 0; | ||
}; | ||
module.exports = supported() ? initialize() : (function() { | ||
var width = function() { | ||
return 0; | ||
}; | ||
width.supported = false; | ||
return width; | ||
}()); |
{ | ||
"name": "text-width", | ||
"version": "1.1.0", | ||
"version": "1.2.0", | ||
"description": "Measure the text width in browsers", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
2714
44