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

@nechlophomeriaa/spotifydl

Package Overview
Dependencies
Maintainers
1
Versions
41
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@nechlophomeriaa/spotifydl - npm Package Compare versions

Comparing version 0.0.2 to 0.0.3

7

index.js

@@ -14,5 +14,6 @@ const id3 = require("node-id3");

async function search(query) {
async function search(query, limit) {
if (isUrl(query)) throw new Error("search function not support for url");
const data = await spotify.search({ q: query, type: "track", limit: 10 });
const limits = limit ? limit : 1;
const data = await spotify.search({ q: query, type: "track", limit: limits });
return data.tracks;

@@ -64,3 +65,3 @@ }

try {
const findTracks = await search(song);
const findTracks = await search(song, 1);
const getTrackInfo = await getTrack(

@@ -67,0 +68,0 @@ findTracks.items[0].external_urls.spotify

@@ -10,3 +10,3 @@ {

"description": "Spotify Downloader with metadata using Node-ID3",
"version": "0.0.2",
"version": "0.0.3",
"main": "index.js",

@@ -13,0 +13,0 @@ "devDependencies": {},

@@ -7,6 +7,17 @@ # Usage

(async () => {
const searchTrack = await search(query)
const searchTrack = await search(query, limit) //
console.log(searchTrack)
// Promise will be return an Array
})
/*
Example: {
(async () => {
const searchTrack = await search("summer salt tidal waves", 5)
console.log(searchTrack)
})
}
*/
```

@@ -13,0 +24,0 @@

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