diff options
author | Florian Dold <florian.dold@gmail.com> | 2017-05-27 17:36:13 +0200 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2017-05-27 17:36:13 +0200 |
commit | 5f466137ad6ac596600e3ff53c9b786815398445 (patch) | |
tree | f914c221874f0b16bf3def7ac01d59d1a99a3b0b /node_modules/core-js/library/modules/$.iter-define.js | |
parent | c9f5ac8e763eda19aa0564179300cfff76785435 (diff) | |
download | wallet-core-5f466137ad6ac596600e3ff53c9b786815398445.tar.xz |
node_modules, clean up package.json
Diffstat (limited to 'node_modules/core-js/library/modules/$.iter-define.js')
-rw-r--r-- | node_modules/core-js/library/modules/$.iter-define.js | 66 |
1 files changed, 0 insertions, 66 deletions
diff --git a/node_modules/core-js/library/modules/$.iter-define.js b/node_modules/core-js/library/modules/$.iter-define.js deleted file mode 100644 index 630cdf385..000000000 --- a/node_modules/core-js/library/modules/$.iter-define.js +++ /dev/null @@ -1,66 +0,0 @@ -'use strict'; -var LIBRARY = require('./$.library') - , $export = require('./$.export') - , redefine = require('./$.redefine') - , hide = require('./$.hide') - , has = require('./$.has') - , Iterators = require('./$.iterators') - , $iterCreate = require('./$.iter-create') - , setToStringTag = require('./$.set-to-string-tag') - , getProto = require('./$').getProto - , ITERATOR = require('./$.wks')('iterator') - , BUGGY = !([].keys && 'next' in [].keys()) // Safari has buggy iterators w/o `next` - , FF_ITERATOR = '@@iterator' - , KEYS = 'keys' - , VALUES = 'values'; - -var returnThis = function(){ return this; }; - -module.exports = function(Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED){ - $iterCreate(Constructor, NAME, next); - var getMethod = function(kind){ - if(!BUGGY && kind in proto)return proto[kind]; - switch(kind){ - case KEYS: return function keys(){ return new Constructor(this, kind); }; - case VALUES: return function values(){ return new Constructor(this, kind); }; - } return function entries(){ return new Constructor(this, kind); }; - }; - var TAG = NAME + ' Iterator' - , DEF_VALUES = DEFAULT == VALUES - , VALUES_BUG = false - , proto = Base.prototype - , $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT] - , $default = $native || getMethod(DEFAULT) - , methods, key; - // Fix native - if($native){ - var IteratorPrototype = getProto($default.call(new Base)); - // Set @@toStringTag to native iterators - setToStringTag(IteratorPrototype, TAG, true); - // FF fix - if(!LIBRARY && has(proto, FF_ITERATOR))hide(IteratorPrototype, ITERATOR, returnThis); - // fix Array#{values, @@iterator}.name in V8 / FF - if(DEF_VALUES && $native.name !== VALUES){ - VALUES_BUG = true; - $default = function values(){ return $native.call(this); }; - } - } - // Define iterator - if((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])){ - hide(proto, ITERATOR, $default); - } - // Plug for library - Iterators[NAME] = $default; - Iterators[TAG] = returnThis; - if(DEFAULT){ - methods = { - values: DEF_VALUES ? $default : getMethod(VALUES), - keys: IS_SET ? $default : getMethod(KEYS), - entries: !DEF_VALUES ? $default : getMethod('entries') - }; - if(FORCED)for(key in methods){ - if(!(key in proto))redefine(proto, key, methods[key]); - } else $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods); - } - return methods; -};
\ No newline at end of file |