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

ytsearcher

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ytsearcher - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

8

lib/struct/YTSearch.js

@@ -118,3 +118,3 @@ 'use strict';

nextPage ( newOptions = this.options ) {
newOptions = Object.assign(newOptions||{}, this.options);
newOptions = Object.assign({}, newOptions, this.options);
return new Promise( async (res, rej) => {

@@ -124,3 +124,3 @@ if(!this.nextPageToken) res(null);

try{
res( await this.search(Object.assign({}, newOptions||this.options, {pageToken: this.nextPageToken})) );
res( await this.search(Object.assign( newOptions, {pageToken: this.nextPageToken})) );
}catch(err){

@@ -142,3 +142,3 @@ rej(err);

prevPage ( newOptions = {} ) {
newOptions = Object.assign(newOptions||{}, this.options);
newOptions = Object.assign({}, newOptions, this.options);
return new Promise( async (res, rej) => {

@@ -148,3 +148,3 @@ if(!this.prevPageToken) res(null);

try{
res( await this.search(Object.assign({}, newOptions||this.options, {pageToken: this.prevPageToken})) );
res( await this.search(Object.assign(newOptions, {pageToken: this.prevPageToken})) );
}catch(err){

@@ -151,0 +151,0 @@ rej(err);

@@ -44,3 +44,3 @@ 'use strict';

Object.defineProperty( this, _protectkey, {
value: typeof apiKey.revealkey ==='boolean'?!apiKey.revealkey:true,
value: typeof apiKey.revealkey ==='boolean'? (!apiKey.revealkey):true,
} );

@@ -62,3 +62,3 @@

get key () {
return this[_protectkey]?_key.get(this):undefined;
return this[_protectkey]?undefined:_key.get(this);
}

@@ -65,0 +65,0 @@

{
"name": "ytsearcher",
"version": "1.0.1",
"version": "1.0.2",
"description": "A nodejs package that provides an easy-to-use promise-based system of getting youtube search results",

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

@@ -16,2 +16,9 @@ # YTSearcher

By default the api key will be irretrievable. To enable access to `searcher.key` create the object like so:
const searcher2 = new YTSearcher( {
key: apiKey,
revealkey: true,
} );
**To Perform Searches**

@@ -37,5 +44,5 @@

// A YTSearch has a built in page flipper.
result.nextPage();
result.prevPage();
// A YTSearch has a built in page flipper, which will update the properties of YTSearch, including `first`. These will return null when the last and first page have been hit (respectively).
await result.nextPage();
await result.prevPage();

@@ -42,0 +49,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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