New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

stimulus_reflex

Package Overview
Dependencies
Maintainers
1
Versions
80
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

stimulus_reflex - npm Package Compare versions

Comparing version 1.0.2 to 1.1.0

8

package.json
{
"name": "stimulus_reflex",
"version": "1.0.2",
"version": "1.1.0",
"main": "./stimulus_reflex.js",
"scripts": {
"prettier-check": "yarn run prettier --check ./stimulus_reflex.js"
},
"repository": {

@@ -14,3 +17,6 @@ "type": "git",

"cable_ready": ">= 4.0.3"
},
"devDependencies": {
"prettier": "^1.18.2"
}
}

@@ -41,3 +41,20 @@ import ActionCable from 'actioncable';

let target = args.shift();
controller.StimulusReflex.subscription.send({ target, args, url });
let attrs = Array.prototype.slice.call(this.element.attributes).reduce((memo, attr) => {
memo[attr.name] = attr.value;
return memo;
}, {});
attrs.value = this.element.value;
attrs.checked = !!this.element.checked;
attrs.selected = !!this.element.selected;
if (this.element.tagName.match(/select/i)) {
if (this.element.multiple) {
const checkedOptions = Array.prototype.slice.call(this.element.querySelectorAll('option:checked'));
attrs.values = checkedOptions.map(o => o.value);
} else if (this.element.selectedIndex > -1) {
attrs.value = this.element.options[this.element.selectedIndex].value;
}
}
controller.StimulusReflex.subscription.send({ target, args, attrs, url });
},

@@ -44,0 +61,0 @@ });

.prettierrc.yml
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