shim.js 412 B

123456789101112131415161718
  1. 'use strict';
  2. var getPolyfill = require('./polyfill');
  3. var define = require('define-properties');
  4. var getIteratorPolyfill = require('../Iterator/polyfill');
  5. module.exports = function shimIteratorFrom() {
  6. var $Iterator = getIteratorPolyfill();
  7. var polyfill = getPolyfill();
  8. define(
  9. $Iterator,
  10. { from: polyfill },
  11. { from: function () { return $Iterator.from !== polyfill; } }
  12. );
  13. return polyfill;
  14. };