UNPKG

rubico

Version:

[a]synchronous functional programming

18 lines (15 loc) 349 B
/** * Rubico v2.8.2 * https://rubico.land/ * * © Richard Yufei Tong, King of Software * Rubico may be freely distributed under the CFOSS license. */ const last = value => { if (value == null) { return undefined } const length = value.length return typeof length == 'number' ? value[length - 1] : undefined } export default last