New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

csstats-reader

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

csstats-reader - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

2

package.json
{
"name": "csstats-reader",
"displayName": "csstats-reader",
"version": "1.0.0",
"version": "1.0.1",
"description": "Node.js package for parse AMX Mod X Stats File.",

@@ -6,0 +6,0 @@ "author": "Giovani de Oliveira <giovanioliveira@outlook.com.br>",

@@ -18,4 +18,15 @@ const { CSStatsService } = require('../services');

}
/**
* Parse csstats.dat and return top 10
*
* @param {string} path csstats.dat path
*
* @returns {Promise} return Promise
*/
async top(path) {
return this._service.top(path);
}
}
module.exports = CSStatsController;

@@ -56,4 +56,13 @@ const fs = require('fs');

}
async top(path) {
const stats = await this.parse(path);
const players = stats.sort((a, b) => ((a.kills < b.kills) ? 1 : -1));
const length = players.length >= 10 ? 9 : players.length;
return players.slice(0, length);
}
}
module.exports = CSStats;
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc