MCPcopy Create free account
hub / github.com/codrops/RainEffect / createMethod

Function createMethod

demo/js/main.js:848–853  ·  view source on GitHub ↗
(kind)

Source from the content-addressed store, hash-verified

846module.exports = function(Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCE){
847 require('./$.iter-create')(Constructor, NAME, next);
848 var createMethod = function(kind){
849 switch(kind){
850 case KEYS: return function keys(){ return new Constructor(this, kind); };
851 case VALUES: return function values(){ return new Constructor(this, kind); };
852 } return function entries(){ return new Constructor(this, kind); };
853 };
854 var TAG = NAME + ' Iterator'
855 , proto = Base.prototype
856 , _native = proto[SYMBOL_ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT]

Callers 1

main.jsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected