(func, argc, typeName, adapter, modeName, xcvPart)
| 9343 | (B) typeName is not a string or (C) argc is not one of (1, 2). |
| 9344 | */ |
| 9345 | const __xAdapter = function(func, argc, typeName, adapter, modeName, xcvPart){ |
| 9346 | if('string'===typeof typeName){ |
| 9347 | if(1===argc) return xcvPart.get(typeName); |
| 9348 | else if(2===argc){ |
| 9349 | if(!adapter){ |
| 9350 | xcvPart.delete(typeName); |
| 9351 | return func; |
| 9352 | }else if(!(adapter instanceof Function)){ |
| 9353 | toss(modeName,"requires a function argument."); |
| 9354 | } |
| 9355 | xcvPart.set(typeName, adapter); |
| 9356 | return func; |
| 9357 | } |
| 9358 | } |
| 9359 | toss("Invalid arguments to",modeName); |
| 9360 | }; |
| 9361 | |
| 9362 | /** |
| 9363 | Gets, sets, or removes a result value adapter for use with |
no test coverage detected