Chromium Code Reviews| Index: Source/devtools/front_end/utilities.js |
| diff --git a/Source/devtools/front_end/utilities.js b/Source/devtools/front_end/utilities.js |
| index ec577153e62d453c0bc9977fabeef12f935302aa..0f6b84de2cb7297b93e7e6f539ed956834666ca7 100644 |
| --- a/Source/devtools/front_end/utilities.js |
| +++ b/Source/devtools/front_end/utilities.js |
| @@ -276,6 +276,18 @@ String.naturalOrderComparator = function(a, b) |
| } |
| /** |
| + * @param {string} name |
| + * @param {number=} arrayLength |
| + * @return {boolean} |
| + */ |
| +String.isArrayIndexPropertyName = function(name, arrayLength) |
|
pfeldman
2014/01/23 16:19:02
We define these on prototype.
aandrey
2014/01/24 06:22:04
Didn't work in this case. Because:
typeof name ==
|
| +{ |
| + // Array index check according to the ES5-15.4. |
| + var index = name >>> 0; |
| + return String(index) === name && index !== 0xffffffff && (typeof arrayLength === "undefined" || index < arrayLength); |
| +} |
| + |
| +/** |
| * @param {number} num |
| * @param {number} min |
| * @param {number} max |