Skip to content

Latest commit

 

History

History
28 lines (18 loc) · 634 Bytes

README.md

File metadata and controls

28 lines (18 loc) · 634 Bytes

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