Socket
Socket
Sign inDemoInstall

@barchart/events-client-js

Package Overview
Dependencies
20
Maintainers
1
Versions
62
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 4.2.0 to 5.0.0

LICENSE

1

lib/data/.meta.js

@@ -16,2 +16,3 @@ /**

* @property {EventType} type - The type of event.
* @property {String} version - The version of the product.
* @property {Timestamp} timestamp - The time of the event's occurrence.

@@ -18,0 +19,0 @@ * @property {String[]} context - Additional data which qualifies the event's type.

11

lib/engine/EventFactory.js

@@ -18,10 +18,13 @@ const assert = require('@barchart/common-js/lang/assert'),

* @param {ProductType} product
* @param {String} version
*/
class EventFactory {
constructor(customer, product) {
constructor(customer, product, version) {
assert.argumentIsRequired(customer, 'customer', CustomerType, 'CustomerType');
assert.argumentIsRequired(product, 'product', ProductType, 'ProductType');
assert.argumentIsRequired(version, 'version', String, 'String');
this._customer = customer;
this._product = product;
this._version = version;
}

@@ -44,2 +47,3 @@

product: this._product,
version: this._version,
type: type,

@@ -57,6 +61,7 @@ timestamp: Timestamp.now().timestamp,

* @param {ProductType} product
* @param {String} version
* @returns {EventFactory}
*/
static for(customer, product) {
return new EventFactory(customer, product);
static for(customer, product, version) {
return new EventFactory(customer, product, version);
}

@@ -63,0 +68,0 @@

@@ -5,4 +5,4 @@ module.exports = (() => {

return {
version: '4.2.0'
version: '5.0.0'
};
})();
{
"name": "@barchart/events-client-js",
"version": "4.2.0",
"version": "5.0.0",
"description": "JavaScript SDK for Barchart's Event Tracking Service",

@@ -26,3 +26,3 @@ "author": {

"@barchart/common-js": "^4.8.0",
"@barchart/events-api-common": "^4.2.0"
"@barchart/events-api-common": "^5.0.0"
},

@@ -51,3 +51,4 @@ "devDependencies": {

},
"license": "MIT"
"license": "MIT",
"gitHead": "f85d29d39dca426845ae2271a5263d2c478bdbc3"
}
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