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

selfish-google-drive

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

selfish-google-drive - npm Package Compare versions

Comparing version 1.0.4 to 1.0.5

2

package.json
{
"name": "selfish-google-drive",
"version": "1.0.4",
"version": "1.0.5",
"description": "Google drive api for that access your own account",

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

@@ -25,7 +25,19 @@ const _ = require('lodash');

* @param {String} token.access_token
* @param {String} searchObject.name
* @param {String} searchObject.mimeType
* @returns {Object}
*/
module.exports = (token, searchKeyword) => {
module.exports = (token, searchObject) => {
const accessToken = _.get(token, 'access_token');
const { name, mimeType } = searchObject;
let gdQuery = 'trashed = false ';
if (name) {
gdQuery += `and name contains '${_.trim(name)}' `;
}
if (mimeType) {
gdQuery += `and mimeType contains '${_.trim(mimeType)}' `;
}
return request

@@ -36,3 +48,3 @@ .get(constant.lsUrl)

pageSize: 1000,
q: `trashed = false and name contains '${_.trim(searchKeyword)}'`,
q: gdQuery,
})

@@ -39,0 +51,0 @@ .set('Accept', 'application/json')

@@ -27,5 +27,10 @@ const _ = require('lodash');

*/
module.exports = (token) => {
module.exports = (token, folderId) => {
let gdQuery = 'trashed = false ';
const accessToken = _.get(token, 'access_token');
if (folderId) {
gdQuery += `and parents in '${folderId}'`;
}
return request

@@ -36,3 +41,3 @@ .get(constant.lsUrl)

pageSize: 1000,
q: 'trashed = false',
q: gdQuery,
})

@@ -39,0 +44,0 @@ .set('Accept', 'application/json')

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