vue hello world项目
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

41 lines
1.5 KiB

'use strict';
// https://github.com/tc39/proposal-iterator-helpers
var $ = require('../internals/export');
var global = require('../internals/global');
var anInstance = require('../internals/an-instance');
var isCallable = require('../internals/is-callable');
var createNonEnumerableProperty = require('../internals/create-non-enumerable-property');
var fails = require('../internals/fails');
var hasOwn = require('../internals/has-own-property');
var wellKnownSymbol = require('../internals/well-known-symbol');
var IteratorPrototype = require('../internals/iterators-core').IteratorPrototype;
var IS_PURE = require('../internals/is-pure');
var TO_STRING_TAG = wellKnownSymbol('toStringTag');
var NativeIterator = global.Iterator;
// FF56- have non-standard global helper `Iterator`
var FORCED = IS_PURE
|| !isCallable(NativeIterator)
|| NativeIterator.prototype !== IteratorPrototype
// FF44- non-standard `Iterator` passes previous tests
|| !fails(function () { NativeIterator({}); });
var IteratorConstructor = function Iterator() {
anInstance(this, IteratorPrototype);
};
if (!hasOwn(IteratorPrototype, TO_STRING_TAG)) {
createNonEnumerableProperty(IteratorPrototype, TO_STRING_TAG, 'Iterator');
}
if (FORCED || !hasOwn(IteratorPrototype, 'constructor') || IteratorPrototype.constructor === Object) {
createNonEnumerableProperty(IteratorPrototype, 'constructor', IteratorConstructor);
}
IteratorConstructor.prototype = IteratorPrototype;
$({ global: true, forced: FORCED }, {
Iterator: IteratorConstructor
});