Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ksoft.js

Package Overview
Dependencies
Maintainers
1
Versions
51
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ksoft.js - npm Package Compare versions

Comparing version 1.2.7 to 1.2.8

20

lib/apis/music.js

@@ -25,3 +25,21 @@ /**

if (!provider || !tracks) throw new Error('[Ksoft API] Please specify the provider and tracks parameters');
const allowedProviders = ['youtube_ids', 'youtube', 'spotify'];
if (!allowedProviders.some(item => item === provider))
throw new Error(
'[Ksoft API] Please specify the correct provider. Options: youtube_ids, youtube, or spotify'
);
if (typeof tracks === 'object') {
if (tracks.length < 1) throw new Error('[Ksoft API] Please provide a track to search');
if (tracks.length > 5) throw new Error('[Ksoft API] Please provide less than or equal to 5 tracks');
}
if (tracks.slice('').some(item => item === ',')) {
const trackArray = tracks.slice(',');
if (trackArray.length < 1) throw new Error('[Ksoft API] Please provide a track to search');
if (trackArray.length > 5) throw new Error('[Ksoft API] Please provide less than or equal to 5 tracks');
}
if (tracks.slice('').some(item => item === '\n')) {
const trackArray = tracks.slice('\n');
if (trackArray.length < 1) throw new Error('[Ksoft API] Please provide a track to search');
if (trackArray.length > 5) throw new Error('[Ksoft API] Please provide less than or equal to 5 tracks');
}
const { data } = await this.http.post('/music/recommendations', {

@@ -28,0 +46,0 @@ provider: provider,

2

package.json
{
"name": "ksoft.js",
"version": "1.2.7",
"version": "1.2.8",
"description": "Official API Wrapper for KSoft.Si API, written in Node.js",

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

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