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

anima-yocto-ajax

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

anima-yocto-ajax - npm Package Compare versions

Comparing version 1.0.4 to 1.0.5

4

HISTORY.md

@@ -5,2 +5,6 @@ # History

## 1.0.5
`fixed` 为beforeSend、success、error、complete方法增加前置判断,防止直接调用ajaxJSONP方法报错
## 1.0.4

@@ -7,0 +11,0 @@

2

package.json
{
"name": "anima-yocto-ajax",
"version": "1.0.4",
"version": "1.0.5",
"description": "the ajax from yocto",

@@ -5,0 +5,0 @@ "keywords": [],

// triggers an extra global event "ajaxBeforeSend" that's like "ajaxSend" but cancelable
function ajaxBeforeSend(xhr, settings) {
var context = settings.context
if (settings.beforeSend.call(context, xhr, settings) === false)
if (settings.beforeSend && settings.beforeSend.call(context, xhr, settings) === false)
return false

@@ -9,3 +9,3 @@ }

var context = settings.context, status = 'success'
settings.success.call(context, data, status, xhr)
settings.success && settings.success.call(context, data, status, xhr)
if (deferred) deferred.resolveWith(context, [data, status, xhr])

@@ -17,3 +17,3 @@ ajaxComplete(status, xhr, settings)

var context = settings.context
settings.error.call(context, xhr, type, error)
settings.error && settings.error.call(context, xhr, type, error)
if (deferred) deferred.rejectWith(context, [xhr, type, error])

@@ -25,3 +25,3 @@ ajaxComplete(type, xhr, settings)

var context = settings.context
settings.complete.call(context, xhr, status)
settings.complete && settings.complete.call(context, xhr, status)
}

@@ -28,0 +28,0 @@

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