3.18.0 • Published 6 months ago
@lskjs/stats v3.18.0
LSK.js – stats
@lskjs/stats – LSK.js – stats – Module for count simple statistics
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
👏 Contributing
- Fork it (https://github.com/yourname/yourproject/fork)
- Create your feature branch (
git checkout -b features/fooBar
) - Commit your changes (
git commit -am 'feat(image): Add some fooBar'
) - Push to the branch (
git push origin feature/fooBar
) - Create a new Pull Request
📮 Any questions? Always welcome :)
3.17.0
6 months ago
3.8.1
10 months ago
3.18.0
6 months ago
3.16.5
6 months ago
3.16.4
6 months ago
3.1.1
1 year ago
2.88.1
1 year ago
2.85.0
1 year ago
2.85.1
1 year ago
2.84.11
2 years ago
2.74.0
2 years ago
2.73.0
2 years ago
2.72.0
2 years ago
2.76.0
2 years ago
2.75.1
2 years ago
2.70.0
2 years ago
2.69.1
2 years ago
2.64.0
2 years ago
2.65.0
2 years ago
2.64.1
2 years ago
2.66.0
2 years ago
2.65.1
2 years ago
2.67.0
2 years ago
2.66.1
2 years ago
2.63.0
2 years ago
2.56.0
2 years ago
2.61.0
2 years ago
2.60.1
2 years ago
2.62.0
2 years ago
2.52.0
2 years ago
2.57.0
2 years ago
2.59.0
2 years ago
2.46.0
3 years ago
2.43.0
3 years ago
2.36.1
3 years ago