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

paypal-isomorphic-functions

Package Overview
Dependencies
Maintainers
1
Versions
30
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

paypal-isomorphic-functions - npm Package Compare versions

Comparing version 1.0.3 to 1.0.4

7

dist/config.js

@@ -7,4 +7,5 @@ "use strict";

const btoa_1 = __importDefault(require("btoa"));
const browser_or_node_1 = require("browser-or-node");
exports.CONFIG = new Map();
if (process) {
if (browser_or_node_1.isNode) {
exports.CONFIG.set("PAYPAL_CLIENT_ID", process.env.PAYPAL_CLIENT_ID);

@@ -15,3 +16,3 @@ exports.CONFIG.set("PAYPAL_CLIENT_SECRET", process.env.PAYPAL_CLIENT_SECRET);

}
else {
else if (browser_or_node_1.isBrowser) {
exports.CONFIG.set("PAYPAL_CLIENT_ID", window.localStorage.getItem("PAYPAL_CLIENT_ID"));

@@ -22,5 +23,5 @@ exports.CONFIG.set("PAYPAL_CLIENT_SECRET", window.localStorage.getItem("PAYPAL_CLIENT_SECRET"));

}
exports.CONFIG.set("PAYPAL_REST_HOSTNAME", exports.CONFIG.get("PAYPAL_ENVIRONMENT") === "productin"
exports.CONFIG.set("PAYPAL_REST_HOSTNAME", exports.CONFIG.get("PAYPAL_ENVIRONMENT") === "production"
? "https://api.paypal.com"
: "https://api.sandbox.paypal.com");
//# sourceMappingURL=config.js.map
{
"name": "paypal-isomorphic-functions",
"version": "1.0.3",
"version": "1.0.4",
"description": "Library of helpful paypal functions that can be run in a browser or server",

@@ -15,2 +15,3 @@ "main": "./dist/index.js",

"devDependencies": {
"@types/browser-or-node": "^1.2.0",
"@types/btoa": "^1.2.3",

@@ -24,2 +25,3 @@ "@types/node": "^13.1.7",

"dependencies": {
"browser-or-node": "^1.2.1",
"btoa": "^1.2.1",

@@ -26,0 +28,0 @@ "es6-promise": "^4.2.8",

import btoa from "btoa";
import { isNode, isBrowser } from 'browser-or-node';

@@ -6,3 +7,3 @@ export const CONFIG = new Map();

// Server Config
if (process) {
if (isNode) {
CONFIG.set("PAYPAL_CLIENT_ID", process.env.PAYPAL_CLIENT_ID);

@@ -15,3 +16,3 @@ CONFIG.set("PAYPAL_CLIENT_SECRET", process.env.PAYPAL_CLIENT_SECRET);

);
} else {
} else if (isBrowser) {
CONFIG.set(

@@ -41,5 +42,5 @@ "PAYPAL_CLIENT_ID",

"PAYPAL_REST_HOSTNAME",
CONFIG.get("PAYPAL_ENVIRONMENT") === "productin"
CONFIG.get("PAYPAL_ENVIRONMENT") === "production"
? "https://api.paypal.com"
: "https://api.sandbox.paypal.com"
);

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

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