[SERVER-18284] Remove Array.isArray polyfill code Created: 30/Apr/15  Updated: 19/Sep/15  Resolved: 01/May/15

Status: Closed
Project: Core Server
Component/s: JavaScript, Shell
Affects Version/s: 3.1.2
Fix Version/s: 3.1.3

Type: Bug Priority: Trivial - P5
Reporter: Kamran K. Assignee: Adam Midvidy
Resolution: Done Votes: 0
Labels: 32qa, Fit&Finish
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
is related to SERVER-18198 runCommand in the shell should use na... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Platform 3 05/15/15
Participants:

 Description   

There are two Array.isArray polyfills that I believe can be safely removed or replaced by plain Array.isArray calls:

src/mongo/shell/mongo.js (introduced by SERVER-18198):

var isArray = function(maybeArray) {
    return Object.prototype.toString.call(maybeArray) === '[object Array]';
};

src/mongo/shell/types.js:

if (typeof Array.isArray != "function"){
    Array.isArray = function(arr){
        return arr != undefined && arr.constructor == Array
    }
}



 Comments   
Comment by Githook User [ 01/May/15 ]

Author:

{u'username': u'amidvidy', u'name': u'Adam Midvidy', u'email': u'amidvidy@gmail.com'}

Message: SERVER-18284 use plain Array.isArray instead of polyfills
Branch: master
https://github.com/mongodb/mongo/commit/03fed07bdc2bbd1324afa0e838e4d83a4f7cfa8b

Generated at Thu Feb 08 03:47:11 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.