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

@barchart/common-js

Package Overview
Dependencies
Maintainers
1
Versions
457
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@barchart/common-js - npm Package Compare versions

Comparing version 3.0.3 to 3.0.4

serialization/json/Component.js

2

collections/Tree.js

@@ -7,3 +7,3 @@ module.exports = (() => {

* an item, a reference to the parent node, and a reference to
* children nodes.
* children nodes. Children are stored in insertion order.
*

@@ -10,0 +10,0 @@ * @public

@@ -215,2 +215,13 @@ const assert = require('./assert'),

/**
* Parses the value emitted by {@link Decimal#toJSON}.
*
* @public
* @param {String} value
* @returns {Decimal}
*/
static parse(value) {
return new Decimal(value);
}
/**
* Returns an instance with the value of zero.

@@ -217,0 +228,0 @@ *

@@ -65,2 +65,6 @@ const assert = require('./assert');

toJSON() {
return this.code;
}
/**

@@ -67,0 +71,0 @@ * Looks up a enumeration item; given the enumeration type and the enumeration

@@ -15,3 +15,3 @@ const assert = require('./assert'),

* @param {Decimal|Number|String} - A amount, which can be parsed as a {@link Decimal}
* @param {Currecny} - The currency.
* @param {Currency} - The currency.
*/

@@ -50,2 +50,25 @@ class Money {

/**
* Returns the JSON representation.
*
* @public
* @returns {Object}
*/
toJSON() {
return {
decimal: this._decimal,
currency: this._currency
};
}
/**
* Parses the value emitted by {@link Decimal#toJSON}.
*
* @public
* @param {Object} value
* @returns {Money}
*/
static parse(value) {
return new Money(value.decimal, value.currency);
}
toString() {

@@ -52,0 +75,0 @@ return `[Money]`;

@@ -65,2 +65,13 @@ const assert = require('./assert'),

/**
* Parses the value emitted by {@link Timestamp#toJSON}.
*
* @public
* @param {String} value
* @returns {Timestamp}
*/
static parse(value) {
return new Timestamp(value);
}
toString() {

@@ -67,0 +78,0 @@ return '[Timestamp]';

{
"name": "@barchart/common-js",
"version": "3.0.3",
"version": "3.0.4",
"description": "Library of common javascript utilities",

@@ -5,0 +5,0 @@ "author": {

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 too big to display

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