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

air

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

air - npm Package Compare versions

Comparing version 0.4.11 to 0.4.12

12

lib/air/disabled.js

@@ -1,9 +0,9 @@

var attr = 'disabled';
var className = 'disabled';
/**
* Toggles the diabled attribute on an element.
* Toggles the disabled class on an element.
*
* A typical css rule might be:
*
* [disabled]{pointer-events: none; opacity: 0.8;}
* .disabled{pointer-events: none; opacity: 0.8;}
*/

@@ -14,9 +14,9 @@ function disabled(val) {

if(val === undefined) {
return this.attr(attr);
return this.hasClass(className);
// hide on truthy
}else if(val) {
this.attr(attr, '1');
this.addClass(className);
// show on falsey
}else{
this.attr(attr, null);
this.removeClass(className);
}

@@ -23,0 +23,0 @@ return this;

@@ -78,2 +78,8 @@ /**

// sadly IE10/11 does not support `json` response type
// see: http://caniuse.com/#feat=xhr2
if(opts.responseType) {
req.responseType = opts.responseType;
}
// apply custom request headers

@@ -90,9 +96,13 @@ for(z in opts.headers) {

if(this.readyState === 4) {
var res = this.responseText
var res = opts.responseType ? this.response : this.responseText
, info = {
headers: parse(this.getAllResponseHeaders()), status: this.status};
headers: parse(this.getAllResponseHeaders()),
status: this.status
};
info.body = res;
if(res && opts.json && (this.status === 200 || this.status === 201)) {
try {
info.body = JSON.parse(res);
info.body = JSON.parse(this.responseText);
}catch(e) {

@@ -99,0 +109,0 @@ return done(

{
"name": "air",
"description": "Lightweight, modular DOM library",
"version": "0.4.11",
"version": "0.4.12",
"author": "muji <noop@xpm.io>",

@@ -6,0 +6,0 @@ "license": "MIT",

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