Comparing version 2.0.1 to 2.0.2
@@ -0,1 +1,5 @@ | ||
## 2.0.2 (2023-10-05) | ||
* Add `BigInt` support | ||
## 2.0.1 (2023-01-23) | ||
@@ -2,0 +6,0 @@ |
@@ -276,3 +276,3 @@ "use strict"; | ||
* @since 2.0.0 | ||
* @version 2.0.1 | ||
* @version 2.0.2 | ||
* | ||
@@ -316,2 +316,4 @@ * @param {Object} holder The object that holds the value | ||
return new EscapedObjectValue(holder, key, value.value, parent, this); | ||
} else if (dry_type === 'bigint') { | ||
return new BigIntValue(holder, key, value, parent, this); | ||
} else { | ||
@@ -335,3 +337,3 @@ result = new UnknownUndrierValue(holder, key, value, parent, this); | ||
* @since 2.0.0 | ||
* @version 2.0.1 | ||
* @version 2.0.2 | ||
* | ||
@@ -362,2 +364,5 @@ * @param {Object} holder The object that holds the value | ||
return new NumberValue(holder, key, value, parent, this); | ||
case 'bigint': | ||
return new BigIntValue(holder, key, value, parent, this); | ||
@@ -781,2 +786,19 @@ default: | ||
/** | ||
* Represent a BigInt value | ||
* | ||
* @author Jelle De Loecker <jelle@elevenways.be> | ||
* @since 2.0.2 | ||
* @version 2.0.2 | ||
*/ | ||
class BigIntValue extends Value { | ||
driedValue() { | ||
return {dry: 'bigint', value: '' + this.value}; | ||
} | ||
initialRevive(value) { | ||
return BigInt(value.value); | ||
} | ||
} | ||
/** | ||
* Represent a regexp value | ||
@@ -783,0 +805,0 @@ * (For undrying) |
{ | ||
"name": "json-dry", | ||
"description": "Don't repeat yourself, JSON: Add support for (circular) references, class instances, ...", | ||
"version": "2.0.1", | ||
"version": "2.0.2", | ||
"author": "Jelle De Loecker <jelle@elevenways.be>", | ||
@@ -6,0 +6,0 @@ "keywords": [ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
49988
1372