Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-18284

Remove Array.isArray polyfill code

    XMLWordPrintable

Details

    • Fully Compatible
    • ALL
    • Platform 3 05/15/15

    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
          }
      }
      

      Attachments

        Issue Links

          Activity

            People

              adam.midvidy Adam Midvidy
              kamran.khan Kamran K.
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: