Socket
Socket
Sign inDemoInstall

ksoft.js

Package Overview
Dependencies
118
Maintainers
1
Versions
51
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.1.4 to 1.1.5

23

lib/apis/bans.js

@@ -214,3 +214,3 @@ /**

*/
async bulkCheck(ids, { bannedOnly, moreInfo }) {
async bulkCheck(ids, { bannedOnly, moreInfo, advancedBannedOnly }) {
if (!ids) throw new Error("[Ksoft API] Please specify an array of id's");

@@ -220,8 +220,19 @@ const options = { users: ids.join(',') };

if (moreInfo) options.more_info = moreInfo;
try {
const { data } = await this.http.get(`/bans/bulkcheck?${require('querystring').stringify(options)}`);
return data;
} catch (err) {
console.error(err);
let finalResult;
async function getAdvancedBans() {
return await this.http.get(`/bans/bulkcheck?users=${ids.join(',')}&more_info=true`);
}
if (advancedBannedOnly) {
const { data } = await getAdvancedBans.call(this);
const finalResult = data.filter(b => b.is_ban_active);
if (finalResult.length <= 1) throw new Error('there are no bans in the current array');
return finalResult;
} else {
try {
const { data } = await this.http.get(`/bans/bulkcheck?${require('querystring').stringify(options)}`);
return data;
} catch (err) {
console.error(err);
}
}
}

@@ -228,0 +239,0 @@

{
"name": "ksoft.js",
"version": "1.1.4",
"version": "1.1.5",
"description": "Official API Wrapper for KSoft.Si API, written in Node.js",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -94,2 +94,3 @@ # ksoft.js

bannedOnly: Boolean,
advancedBannedOnly: Boolean,
});

@@ -96,0 +97,0 @@ ```

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc