JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 15431
  • Score
    100M100P100Q143133F
  • License MIT

Get the most repeated value in an array

Package Exports

  • ml-array-mode
  • ml-array-mode/lib-es6/index.js
  • ml-array-mode/lib/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (ml-array-mode) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

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