Extracts the key from the first args entry if any and takes care of the Delegator. This is used by NativeSet, NativeWeakMap, and NativeWekSet also. @param args the args @return the first argument (de-delegated) or undefined if there is no element in args
(Object[] args)
| 283 | * @return the first argument (de-delegated) or undefined if there is no element in args |
| 284 | */ |
| 285 | static Object key(Object[] args) { |
| 286 | if (args.length > 0) { |
| 287 | Object key = args[0]; |
| 288 | if (key instanceof Delegator) { |
| 289 | return ((Delegator) key).getDelegee(); |
| 290 | } |
| 291 | return key; |
| 292 | } |
| 293 | return Undefined.instance; |
| 294 | } |
| 295 | } |
no test coverage detected