Function
__guardMethod__
(obj, methodName, transform)
Source from the content-addressed store, hash-verified
| 138 | })()) |
| 139 | |
| 140 | function __guardMethod__ (obj, methodName, transform) { |
| 141 | if (typeof obj !== 'undefined' && obj !== null && typeof obj[methodName] === 'function') { |
| 142 | return transform(obj, methodName) |
| 143 | } else { |
| 144 | return undefined |
| 145 | } |
| 146 | } |
| 147 | function __guard__ (value, transform) { |
| 148 | return (typeof value !== 'undefined' && value !== null) ? transform(value) : undefined |
| 149 | } |
Tested by
no test coverage detected