Socket
Socket
Sign inDemoInstall

cohere-js

Package Overview
Dependencies
0
Maintainers
1
Versions
27
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.7 to 1.0.8

15

es/index.js

@@ -5,3 +5,12 @@ const hookInputSetter = (target, key) => {

set(value) {
this.dispatchEvent(new Event("coherevalueupdate"));
// IE11 - https://stackoverflow.com/a/49071358
let event;
if (typeof Event === "function") {
event = new Event("coherevalueupdate");
}
else {
event = document.createEvent("Event");
event.initEvent("coherevalueupdate", false, false);
}
this.dispatchEvent(event);
if (orig && orig.set) {

@@ -20,2 +29,3 @@ orig.set.call(this, value);

hookInputSetter(HTMLSelectElement.prototype, "value");
hookInputSetter(HTMLSelectElement.prototype, "selectedIndex");
}

@@ -54,5 +64,2 @@ const bridgedMethods = ["init", "identify", "stop", "showCode"];

}
else {
document.head.insertBefore(script, document.head.firstChild);
}
}

@@ -59,0 +66,0 @@ const exportedModule = Cohere;

@@ -7,3 +7,12 @@ 'use strict';

set(value) {
this.dispatchEvent(new Event("coherevalueupdate"));
// IE11 - https://stackoverflow.com/a/49071358
let event;
if (typeof Event === "function") {
event = new Event("coherevalueupdate");
}
else {
event = document.createEvent("Event");
event.initEvent("coherevalueupdate", false, false);
}
this.dispatchEvent(event);
if (orig && orig.set) {

@@ -22,2 +31,3 @@ orig.set.call(this, value);

hookInputSetter(HTMLSelectElement.prototype, "value");
hookInputSetter(HTMLSelectElement.prototype, "selectedIndex");
}

@@ -56,5 +66,2 @@ const bridgedMethods = ["init", "identify", "stop", "showCode"];

}
else {
document.head.insertBefore(script, document.head.firstChild);
}
}

@@ -61,0 +68,0 @@ const exportedModule = Cohere;

{
"name": "cohere-js",
"version": "1.0.7",
"version": "1.0.8",
"description": "Cohere.so JS SDK",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc