* Applies the first method that exists on `object` from `methods`. Otherwise * throws with `message`. * * @param {object} object * @param {array } methods * @param {array<*>} args * @param {string} message * @private
(object, methods, args, message)
| 538 | */ |
| 539 | |
| 540 | function applyOne(object, methods, args, message) { |
| 541 | for (var i = 0; i < methods.length; i++) { |
| 542 | var fn = object[methods[i]]; |
| 543 | if (typeof fn === 'function') { |
| 544 | return fn.apply(object, args); |
| 545 | } |
| 546 | } |
| 547 | if (message) { |
| 548 | throw new Error(message); |
| 549 | } |
| 550 | } |
| 551 | |
| 552 | /** |
| 553 | * Alphanumeric Unique id of `len` length. |
no outgoing calls
no test coverage detected