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

@paypal/sdk-client

Package Overview
Dependencies
Maintainers
31
Versions
167
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@paypal/sdk-client - npm Package Compare versions

Comparing version

to
4.0.158

4

package.json
{
"name": "@paypal/sdk-client",
"version": "4.0.156",
"version": "4.0.158",
"description": "Shared config between PayPal/Braintree.",

@@ -65,3 +65,3 @@ "main": "index.js",

"esdoc-standard-plugin": "1.0.0",
"flow-bin": "0.135.0",
"flow-bin": "0.155.0",
"grumbler-scripts": "^3",

@@ -68,0 +68,0 @@ "mocha": "4.1.0",

/* @flow */
// $FlowFixMe[toplevel-library-import]
import { ENV, COMPONENTS, PROTOCOL } from '@paypal/sdk-constants/src';
// $FlowFixMe[toplevel-library-import]
import type { FundingEligibilityType } from './types';

@@ -28,2 +30,3 @@

// $FlowFixMe[value-as-type]
declare var __FUNDING_ELIGIBILITY__ : FundingEligibilityType;

@@ -64,3 +64,8 @@ /* @flow */

export function callGraphQL<T, V>({ query, variables = {}, headers = {} } : {| query : string, variables : V, headers? : { [string] : string } |}) : ZalgoPromise<T> {
function getDefaultVariables<V>() : V {
// $FlowFixMe[incompatible-return]
return {};
}
export function callGraphQL<T, V>({ query, variables = getDefaultVariables(), headers = {} } : {| query : string, variables : V, headers? : { [string] : string } |}) : ZalgoPromise<T> {
return request({

@@ -67,0 +72,0 @@ url: buildPayPalUrl(GRAPHQL_URI),

@@ -61,3 +61,3 @@ /* @flow */

export const getSDKQueryParam : GetSDKQueryParam = (name, def) => {
export const getSDKQueryParam : GetSDKQueryParam = <T>(name : string, def : T) => {
// $FlowFixMe

@@ -64,0 +64,0 @@ return getSDKQueryParams()[name] || def;