@lskjs/stats
    TypeScript icon, indicating that this package has built-in type declarations

    2.84.11 • Public • Published

    LSK.js – stats

    @lskjs/stats – LSK.js – stats – Module for count simple statistics

    LSK logo NPM version NPM downloads NPM Dependency count Have TypeScript types Have tree shaking NPM Package size Package size Ask us in Telegram


    Table of contents

    ⌨️ Install

    # yarn
    yarn i @lskjs/stats 
    
    # npm
    npm i @lskjs/stats 

    Example:

    import ready from './polyfill';
    import Stats from './Stats';
    
    ready();
    
    const stats = new Stats();
    const startedAt = new Date();
    
    setInterval(() => {
      const event = Math.random() < 0.3 ? 'nack' : 'ack';
      const proxy = Math.random() < 0.3 ? 'none' : `proxy_${Math.round((Math.random() * 10) % 10)}`;
    
      let err;
      if (event === 'nack') {
        err = `code_${Math.round((Math.random() * 10) % 10)}`;
      }
      stats.trigger({ event, startedAt, err, proxy });
      // stats.trigger({ event, startedAt, err, prefix: proxy });
      stats.print();
    }, 10);

    📖 License

    This project is licensed under the MIT License - see the LICENSE file for details

    👥 Contributors


    Igor Suvorov

    💻 🎨 🤔

    👏 Contributing

    1. Fork it (https://github.com/yourname/yourproject/fork)
    2. Create your feature branch (git checkout -b features/fooBar)
    3. Commit your changes (git commit -am 'feat(image): Add some fooBar')
    4. Push to the branch (git push origin feature/fooBar)
    5. Create a new Pull Request

    📮 Any questions? Always welcome :)

    Keywords

    none

    Install

    npm i @lskjs/stats

    DownloadsWeekly Downloads

    57

    Version

    2.84.11

    License

    MIT

    Unpacked Size

    37 kB

    Total Files

    7

    Last publish

    Collaborators

    • isuvorov
    • yukioru
    • andru_xa
    • natavts
    • blacklightburn
    • ga2mer
    • iburey
    • kafkae
    • sophiyabezruk
    • vladik_deniska
    • finalgetname