Sha256: 1406a5771dbe58a9012ba8c20c51380b25838975b389cfa0f6e2112350d672a6

Contents?: true

Size: 562 Bytes

Versions: 5

Compression:

Stored size: 562 Bytes

Contents

(function(env) {
  function hasFunctioningMaps() {
    if (typeof Map === 'undefined') { return false; }

    try {
      var s = new Map([['a', 4]]);
      if (s.size !== 1) { return false; }
      if (s.keys().next().value !== 'a') { return false; }
      if (s.values().next().value !== 4) { return false; }
      return true;
    } catch(e) {
      return false;
    }
  }

  env.requireFunctioningMaps = function() {
    if (!hasFunctioningMaps()) {
      env.pending("Browser has incomplete or missing support for Maps");
    }
  };

})(jasmine.getEnv());

Version data entries

5 entries across 5 versions & 2 rubygems

Version Path
tdiary-5.0.8 vendor/bundle/gems/tdiary-5.0.7/vendor/bundle/gems/jasmine-core-2.8.0/lib/jasmine-core/spec/helpers/checkForMap.js
tdiary-5.0.7 vendor/bundle/gems/jasmine-core-2.8.0/lib/jasmine-core/spec/helpers/checkForMap.js
tdiary-5.0.6 vendor/bundle/gems/jasmine-core-2.8.0/lib/jasmine-core/spec/helpers/checkForMap.js
jasmine-core-2.8.0 ./lib/jasmine-core/spec/helpers/checkForMap.js
jasmine-core-2.7.0 ./lib/jasmine-core/spec/helpers/checkForMap.js