Novices Plagiarizing Mozart
    Have ideas to improve npm?Join in the discussion! »

    stringstats

    0.1.1 • Public • Published

    Build Status

    string-stats

    Calculates frequencies and probabilities of a string

    Build

    npm install
    npm run build
    

    Test

    npm test
    

    Usage

    Review test/stringstats.spec.js for a complete test suite

    let teststr = 'helloworld123';
    let stringstats = new StringStats(teststr);
    
      { '1': { counter: 1, probability: 0.07692307692307693 },
        '2': { counter: 1, probability: 0.07692307692307693 },
        '3': { counter: 1, probability: 0.07692307692307693 },
        h: { counter: 1, probability: 0.07692307692307693 },
        e: { counter: 1, probability: 0.07692307692307693 },
        l: { counter: 3, probability: 0.23076923076923078 },
        o: { counter: 2, probability: 0.15384615384615385 },
        w: { counter: 1, probability: 0.07692307692307693 },
        r: { counter: 1, probability: 0.07692307692307693 },
        d: { counter: 1, probability: 0.07692307692307693 } }
    

    Install

    npm i stringstats

    DownloadsWeekly Downloads

    3

    Version

    0.1.1

    License

    MIT

    Last publish

    Collaborators

    • avatar