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

@stripe/stripe-js

Package Overview
Dependencies
Maintainers
8
Versions
131
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@stripe/stripe-js - npm Package Compare versions

Comparing version 1.3.0 to 1.3.1

19

dist/stripe.esm.js

@@ -14,2 +14,13 @@ var V3_URL = 'https://js.stripe.com/v3';

return script;
};
var registerWrapper = function registerWrapper(stripe) {
if (!stripe || !stripe._registerWrapper) {
return;
}
stripe._registerWrapper({
name: 'stripe-js',
version: "1.3.1"
});
}; // Execute our own script injection after a tick to give users time to

@@ -55,3 +66,9 @@ // do their own script injection.

return stripePromise.then(function (maybeStripe) {
return maybeStripe ? maybeStripe.apply(void 0, args) : null;
if (maybeStripe === null) {
return null;
}
var stripe = maybeStripe.apply(void 0, args);
registerWrapper(stripe);
return stripe;
});

@@ -58,0 +75,0 @@ };

@@ -18,2 +18,13 @@ 'use strict';

return script;
};
var registerWrapper = function registerWrapper(stripe) {
if (!stripe || !stripe._registerWrapper) {
return;
}
stripe._registerWrapper({
name: 'stripe-js',
version: "1.3.1"
});
}; // Execute our own script injection after a tick to give users time to

@@ -59,3 +70,9 @@ // do their own script injection.

return stripePromise.then(function (maybeStripe) {
return maybeStripe ? maybeStripe.apply(void 0, args) : null;
if (maybeStripe === null) {
return null;
}
var stripe = maybeStripe.apply(void 0, args);
registerWrapper(stripe);
return stripe;
});

@@ -62,0 +79,0 @@ };

3

package.json
{
"name": "@stripe/stripe-js",
"version": "1.3.0",
"version": "1.3.1",
"description": "Stripe.js loading utility",

@@ -38,2 +38,3 @@ "main": "dist/stripe.js",

"@babel/preset-env": "^7.7.1",
"@rollup/plugin-replace": "^2.3.1",
"@types/jest": "^24.0.25",

@@ -40,0 +41,0 @@ "@typescript-eslint/eslint-plugin": "^2.15.0",

@@ -5,2 +5,6 @@ // eslint-disable-next-line @typescript-eslint/triple-slash-reference

// `_VERSION` will be rewritten by `@rollup/plugin-replace` as a string literal
// containing the package.json version
declare const _VERSION: string;
const V3_URL = 'https://js.stripe.com/v3';

@@ -25,2 +29,10 @@

const registerWrapper = (stripe: any): void => {
if (!stripe || !stripe._registerWrapper) {
return;
}
stripe._registerWrapper({name: 'stripe-js', version: _VERSION});
};
// Execute our own script injection after a tick to give users time to

@@ -72,5 +84,11 @@ // do their own script injection.

return stripePromise.then((maybeStripe) =>
maybeStripe ? maybeStripe(...args) : null
);
return stripePromise.then((maybeStripe) => {
if (maybeStripe === null) {
return null;
}
const stripe = maybeStripe(...args);
registerWrapper(stripe);
return stripe;
});
};
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