Needlessly Postulating Minds
    Wondering what’s next for npm?Check out our public roadmap! »

    just-last
    TypeScript icon, indicating that this package has built-in type declarations

    2.2.0 • Public • Published

    just-last

    Part of a library of zero-dependency npm modules that do just do one thing.
    Guilt-free utilities for every occasion.

    Try it now

    import last from 'just-last';
    
    last([1, 2, 3, 4, 5]); // 5
    last([{a: 1}, {b: 1}, {c: 1}]); // {c: 1}
    last([true, false, [true, false]]); // [true, false]
    last(); // undefined
    last([]); // undefined
    last(null); // undefined
    last(undefined); // undefined

    Install

    npm i just-last

    DownloadsWeekly Downloads

    65

    Version

    2.2.0

    License

    MIT

    Unpacked Size

    3.08 kB

    Total Files

    6

    Last publish

    Collaborators

    • avatar