Socket
Socket
Sign inDemoInstall

googleapis

Package Overview
Dependencies
Maintainers
1
Versions
257
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

googleapis - npm Package Compare versions

Comparing version 0.4.0 to 0.4.1

13

lib/requests.js

@@ -51,7 +51,10 @@ /**

/**
* Returns true if request requires a parameter.
* Returns true if given params contains a query parameter key.
* If no metadata is known about the request's method, true is returned.
*
* @param {object} params The parameters object.
* @return {boolean} Returns whether a parameter is required or not.
*/
BaseRequest.prototype.doesRequireParams = function() {
BaseRequest.prototype.containsQueryParams = function(params) {
params = params || {};
if (!this.methodMeta) {

@@ -64,3 +67,4 @@ // we dont know much about the method, dont speculate

for (var paramName in parameters) {
if (parameters[paramName].required) {
if (parameters[paramName].location == 'query' &&
params[paramName]) {
return true;

@@ -129,3 +133,4 @@ }

if (!this.doesRequireParams() && !opt_body) {
// move params to
if (!this.containsQueryParams(opt_params) && !opt_body) {
this.params = {};

@@ -132,0 +137,0 @@ this.body = opt_params;

{
"name": "googleapis",
"version": "0.4.0",
"version": "0.4.1",
"author": "Google Inc.",

@@ -5,0 +5,0 @@ "description": "Google APIs Client Library for Node.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