diff options
author | Valerio Virgillito | 2012-02-16 10:54:48 -0800 |
---|---|---|
committer | Valerio Virgillito | 2012-02-16 10:54:48 -0800 |
commit | d52aca45e0357b5597e13d9b74998abb75fabea5 (patch) | |
tree | ffd4a0c060b00611953b7e3ed0b3955bf02ac6e7 /node_modules/montage/core/shim/string.js | |
parent | d366c0bd1af6471511217ed574083e15059519b5 (diff) | |
download | ninja-d52aca45e0357b5597e13d9b74998abb75fabea5.tar.gz |
integrating the latest montage fixes for v0.6 into master
Signed-off-by: Valerio Virgillito <valerio@motorola.com>
Diffstat (limited to 'node_modules/montage/core/shim/string.js')
-rwxr-xr-x | node_modules/montage/core/shim/string.js | 15 |
1 files changed, 15 insertions, 0 deletions
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#* | |||
63 | 63 | ||
64 | }); | 64 | }); |
65 | 65 | ||
66 | /** | ||
67 | Shim implementation of String.isString() for browsers that don't yet support it. | ||
68 | @function external:String.isString() | ||
69 | @param {object} obj The object to determine if its a String. | ||
70 | @returns {boolean} Object.prototype.toString.call(obj) === "[object String]" | ||
71 | */ | ||
72 | if (!String.isString) { | ||
73 | Object.defineProperty(String, "isString", { | ||
74 | value: function(obj) { | ||
75 | return Object.prototype.toString.call(obj) === "[object String]"; | ||
76 | } | ||
77 | }); | ||
78 | } | ||
79 | |||
80 | |||
66 | 81 | ||