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

react-stripe-script-loader

Package Overview
Dependencies
Maintainers
1
Versions
31
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-stripe-script-loader - npm Package Compare versions

Comparing version 1.0.3 to 1.0.5

47

index.js

@@ -10,3 +10,3 @@ "use strict";

var _loadScript = _interopRequireDefault(require("./src/loadScript"));
var _loadScript = _interopRequireDefault(require("./loadScript"));

@@ -81,46 +81,1 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

exports.default = _default;
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var loadScript = function loadScript(src, uniqueId) {
return new Promise(function (resolve, reject) {
var scriptElement = document.getElementById(uniqueId);
if (!scriptElement) {
var script = document.createElement('script');
script.src = src;
script.id = uniqueId;
var handleLoadScriptSuccess = function handleLoadScriptSuccess() {
return resolve({
successful: true
});
};
var handleLoadScriptFail = function handleLoadScriptFail(event) {
return reject({
error: event
});
};
script.addEventListener('load', handleLoadScriptSuccess, {
once: true
});
script.addEventListener('error', handleLoadScriptFail, {
once: true
});
document.head.appendChild(script);
} else {
resolve({
successful: true
});
}
});
};
var _default = loadScript;
exports.default = _default;

4

package.json
{
"name": "react-stripe-script-loader",
"version": "1.0.3",
"version": "1.0.5",
"description": "React component that lets load Stripe script and shows React Stripe Elements",

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

"test": "echo \"Error: no test specified\" && exit 1",
"build": "./node_modules/.bin/babel src --out-file index.js"
"build": "./node_modules/.bin/babel src/index.js --out-file index.js"
},

@@ -11,0 +11,0 @@ "repository": {

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