JSSM, a JavaScript state machine - the FSM for FSL
    Preparing search index...

    Function histograph


    • Returns the histograph of an array as a Map. Makes no attempt to cope with deep equality; will fail for complex contents, as such.

      import { histograph } from './jssm.js';

      histograph( [0, 0, 1, 1, 2, 2, 1] ); // Map()

      Parameters

      • ar: any[]

      Returns Map<any, number>