UNPKG

rubico

Version:

[a]synchronous functional programming

23 lines (22 loc) 422 B
export = last; /** * @name last * * @synopsis * ```coffeescript [specscript] * var value Array|string * * last(value) -> any * ``` * * @description * Get the last item of a collection * * ```javascript [playground] * import last from 'https://unpkg.com/rubico/dist/x/last.es.js' * * console.log(last([1, 2, 3])) // 3 * console.log(last([])) // undefined * ``` */ declare function last(value: any): any;