From d52aca45e0357b5597e13d9b74998abb75fabea5 Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Thu, 16 Feb 2012 10:54:48 -0800 Subject: integrating the latest montage fixes for v0.6 into master Signed-off-by: Valerio Virgillito --- node_modules/montage/core/shim/string.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'node_modules/montage/core/shim/string.js') diff --git a/node_modules/montage/core/shim/string.js b/node_modules/montage/core/shim/string.js index 1b71cec3..52f89710 100755 --- a/node_modules/montage/core/shim/string.js +++ b/node_modules/montage/core/shim/string.js @@ -63,4 +63,19 @@ Object.defineProperties(String.prototype, /** @lends external:String.prototype#* }); +/** + Shim implementation of String.isString() for browsers that don't yet support it. + @function external:String.isString() + @param {object} obj The object to determine if its a String. + @returns {boolean} Object.prototype.toString.call(obj) === "[object String]" +*/ +if (!String.isString) { + Object.defineProperty(String, "isString", { + value: function(obj) { + return Object.prototype.toString.call(obj) === "[object String]"; + } + }); +} + + -- cgit v1.2.3