UNPKG

rubico

Version:

[a]synchronous functional programming

17 lines (14 loc) 350 B
/** * rubico v2.6.2 * https://github.com/a-synchronous/rubico * (c) 2019-2024 Richard Tong * rubico may be freely distributed under the MIT license. */ const last = value => { if (value == null) { return undefined } const length = value.length return typeof length == 'number' ? value[length - 1] : undefined } export default last