* Returns the element at a specific offset in an array if non-empty, `undefined` otherwise. * A negative offset indicates the element should be retrieved from the end of the array.
(array, offset)
| 1296 | * A negative offset indicates the element should be retrieved from the end of the array. |
| 1297 | */ |
| 1298 | function elementAt(array, offset) { |
| 1299 | if (array) { |
| 1300 | offset = toOffset(array, offset); |
| 1301 | if (offset < array.length) { |
| 1302 | return array[offset]; |
| 1303 | } |
| 1304 | } |
| 1305 | return undefined; |
| 1306 | } |
| 1307 | ts.elementAt = elementAt; |
| 1308 | /** |
| 1309 | * Returns the first element of an array if non-empty, `undefined` otherwise. |
nothing calls this directly
no test coverage detected