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

node-youtube-music

Package Overview
Dependencies
Maintainers
1
Versions
34
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-youtube-music - npm Package Compare versions

Comparing version 0.2.4 to 0.2.5

2

dist/examples/search.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const src_1 = require("../src");
const main = () => src_1.default.search('DJOKO', { lang: 'en-US' });
const main = () => src_1.default.search('sitting waiting wishing', { lang: 'fr-FR', country: 'FR' });
main().then((results) => console.log(results));
declare const _default: {
body: (lang?: string | undefined) => {
body: (lang?: string | undefined, country?: string | undefined) => {
context: {

@@ -11,2 +11,3 @@ capabilities: {};

hl: string;
gl: string;
locationInfo: {

@@ -13,0 +14,0 @@ locationPermissionAuthorizationStatus: string;

@@ -5,3 +5,3 @@ "use strict";

// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
body: (lang) => ({
body: (lang, country) => ({
context: {

@@ -15,2 +15,3 @@ capabilities: {},

hl: lang !== null && lang !== void 0 ? lang : 'en',
gl: country !== null && country !== void 0 ? country : 'GB',
locationInfo: {

@@ -17,0 +18,0 @@ locationPermissionAuthorizationStatus: 'LOCATION_PERMISSION_AUTHORIZATION_STATUS_UNSUPPORTED',

@@ -19,3 +19,3 @@ "use strict";

const response = yield got_1.default.post('https://music.youtube.com/youtubei/v1/search', {
json: Object.assign(Object.assign({}, context_1.default.body(options === null || options === void 0 ? void 0 : options.lang)), { params: 'EgWKAQIIAWoKEAoQCRADEAQQBQ%3D%3D', query }),
json: Object.assign(Object.assign({}, context_1.default.body(options === null || options === void 0 ? void 0 : options.lang, options === null || options === void 0 ? void 0 : options.country)), { params: 'EgWKAQIIAWoKEAoQCRADEAQQBQ%3D%3D', query }),
searchParams: {

@@ -22,0 +22,0 @@ alt: 'json',

import ytMusic from '../src';
const main = () => ytMusic.search('DJOKO', { lang: 'fr-FR' });
const main = () =>
ytMusic.search('sitting waiting wishing', { lang: 'fr-FR', country: 'FR' });
main().then((results) => console.log(results));
{
"name": "node-youtube-music",
"description": "Unofficial YouTube Music API for Node.js",
"version": "0.2.4",
"version": "0.2.5",
"main": "dist/src/index.js",

@@ -6,0 +6,0 @@ "types": "dist/src/index.d.ts",

export default {
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
body: (lang?: string) => ({
body: (lang?: string, country?: string) => ({
context: {

@@ -12,2 +12,3 @@ capabilities: {},

hl: lang ?? 'en',
gl: country ?? 'GB',
locationInfo: {

@@ -14,0 +15,0 @@ locationPermissionAuthorizationStatus:

@@ -17,3 +17,3 @@ import got from 'got';

json: {
...context.body(options?.lang),
...context.body(options?.lang, options?.country),
params: 'EgWKAQIIAWoKEAoQCRADEAQQBQ%3D%3D',

@@ -20,0 +20,0 @@ query,

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