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

fetch-jsonp

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fetch-jsonp - npm Package Compare versions

Comparing version 1.1.0 to 1.1.1

21

build/fetch-jsonp.js

@@ -26,4 +26,2 @@ (function (global, factory) {

// Known issue: Will throw 'Uncaught ReferenceError: callback_*** is not defined'
// error if request timeout
function clearFunction(functionName) {

@@ -41,3 +39,5 @@ // IE8 throws an exception when you try to delete a property on window

var script = document.getElementById(scriptId);
document.getElementsByTagName('head')[0].removeChild(script);
if (script) {
document.getElementsByTagName('head')[0].removeChild(script);
}
}

@@ -84,8 +84,2 @@

jsonpScript.id = scriptId;
jsonpScript.onerror = function () {
reject(new Error('JSONP request to ' + _url + ' failed'));
clearFunction(callbackFunction);
removeScript(scriptId);
};
document.getElementsByTagName('head')[0].appendChild(jsonpScript);

@@ -99,2 +93,11 @@

}, timeout);
// Caught if got 404/500
jsonpScript.onerror = function () {
reject(new Error('JSONP request to ' + _url + ' failed'));
clearFunction(callbackFunction);
removeScript(scriptId);
if (timeoutId) clearTimeout(timeoutId);
};
});

@@ -101,0 +104,0 @@ }

@@ -0,1 +1,5 @@

1.1.1 / 2017-6-10
==================
* Fix script error when script request error, thanks to @wheatma
1.1.0 / 2017-6-7

@@ -2,0 +6,0 @@ ==================

{
"name": "fetch-jsonp",
"version": "1.1.0",
"version": "1.1.1",
"description": "Fetch JSONP like a boss using Fetch API",
"main": "build/fetch-jsonp.js",
"scripts": {
"prepublish": "npm run lint && npm run clean && npm run build",
"test": "mocha --compilers js:babel/register --recursive --ui bdd --reporter spec",

@@ -8,0 +9,0 @@ "build": "babel src/ --modules umd --out-dir build",

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