ml-array-mode
TypeScript icon, indicating that this package has built-in type declarations

1.1.5 • Public • Published

array-mode

NPM version npm download

Get the most repeated value in an array.

Installation

$ npm install --save ml-array-mode

Usage

import mode from 'ml-array-mode';

const result = mode([1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 4, 4, 4, 4, 4]);
// 4

License

MIT

/ml-array-mode/

    Package Sidebar

    Install

    npm i ml-array-mode

    Weekly Downloads

    1,111

    Version

    1.1.5

    License

    MIT

    Unpacked Size

    5.23 kB

    Total Files

    8

    Last publish

    Collaborators

    • lpatiny
    • maasencioh
    • mljs-bot
    • stropitek
    • targos