iterator.js 444 B

12345678910111213
  1. 'use strict';
  2. var Map = require('../../polyfill')
  3. , toArray = require('es5-ext/array/to-array');
  4. module.exports = function (T, a) {
  5. var arr = [['raz', 'one'], ['dwa', 'two']], map = new Map(arr);
  6. a.deep(toArray(new T(map)), arr, "Default");
  7. a.deep(toArray(new T(map, 'key+value')), arr, "Key & Value");
  8. a.deep(toArray(new T(map, 'value')), ['one', 'two'], "Value");
  9. a.deep(toArray(new T(map, 'key')), ['raz', 'dwa'], "Value");
  10. };