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

chronology

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

chronology - npm Package Compare versions

Comparing version 0.0.3 to 0.0.4

24

irregular.js

@@ -648,2 +648,7 @@ "use strict";

this.each(function (ip) {
// Throw if observation value is not JSON-expressible
if (!(0, _jsonExpressible.default)(ip.obs.value())) {
throw new Error("NOT_SERIALIZABLE: One or more observation values is not JSON-expressible.");
}
var obs = [_jsontsdate.default.create(ip.start(), "ms"), ip.obs.value()]; // Is this observation contiguous with the next?

@@ -656,20 +661,5 @@

jsonTs.Observations.push(obs);
}); // Try to serialize - fails on circular reference
}); // Success
var ser;
try {
ser = JSON.stringify(jsonTs);
} catch (e) {
throw new Error("NOT_SERIALIZABLE: JSON.stringify() failed to serialize one or more observation values, likely due to a circular reference.");
} // Throw if there are undefined values (JSON.stringify will omit/nullify them)
// Check after circular references, which will hang chronology._isJsonExpressible()
if (!(0, _jsonExpressible.default)(jsonTs)) {
throw new Error("NOT_SERIALIZABLE: Time series contains one or more undefined values, which are not expressible using JSON.");
} // Success
return ser;
return JSON.stringify(jsonTs);
};

@@ -676,0 +666,0 @@ /**

{
"name": "chronology",
"version": "0.0.3",
"version": "0.0.4",
"description": "A flexible library for representing and manipulating time series data.",
"main": "index.js",
"jsdelivr": "bundle.js",
"scripts": {

@@ -7,0 +8,0 @@ "docs": "documentation build src/main.js -f html -o docs --access public --access private --access undefined --sort-order alpha",

@@ -1004,3 +1004,8 @@ "use strict";

this.each(function (rp) {
// Is this observation adjacent to a previous one?
// Throw if observation value is not JSON-expressible
if (!(0, _jsonExpressible.default)(rp.obs.value())) {
throw new Error("NOT_SERIALIZABLE: One or more observation values is not JSON-expressible.");
} // Is this observation adjacent to a previous one?
var adjacent = false;

@@ -1029,20 +1034,5 @@

}
}); // Try to serialize (fails on circular reference)
}); // Success
var ser;
try {
ser = JSON.stringify(jsonTs);
} catch (e) {
throw new Error("NOT_SERIALIZABLE: JSON.stringify() failed to serialize one or more observation values, likely due to a circular reference.");
} // Throw if there are undefined values (JSON.stringify will omit/nullify them)
// Check after circular references, which will hang chronology._isJsonExpressible()
if (!(0, _jsonExpressible.default)(jsonTs)) {
throw new Error("NOT_SERIALIZABLE: Time series contains one or more undefined values, which are not expressible using JSON.");
} // Success
return ser;
return JSON.stringify(jsonTs);
}; // RegularPeriod objects

@@ -1049,0 +1039,0 @@

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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