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 } }

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.1.1
    0
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.1.1
    0
  • 0.1.0
    1

Package Sidebar

Install

npm i stringstats

Weekly Downloads

1

Version

0.1.1

License

MIT

Last publish

Collaborators

  • aecostas