ejson-extras
Advanced tools
Comparing version 1.0.14 to 1.0.15
{ | ||
"name": "ejson-extras", | ||
"version": "1.0.14", | ||
"version": "1.0.15", | ||
"description": | ||
@@ -5,0 +5,0 @@ "Extends EJSON with additional types, including Qty (js-quantities) objects.", |
@@ -84,2 +84,4 @@ # Description | ||
1.0.15 - Fixed Map EJSON stringify/parsing bug. | ||
1.0.11 - Fixed patching of 'require' inside Meteor. | ||
@@ -86,0 +88,0 @@ |
@@ -1,1 +0,1 @@ | ||
{ "$type": "Map", "$value": "[[\"hello\",\"world\"]]" } | ||
{ "$type": "Map", "$value": [["hello", "world"]] } |
@@ -10,3 +10,3 @@ const typeName = 'Map'; | ||
toJSONValue() { | ||
return JSON.stringify([...this]); | ||
return [...this]; | ||
}, | ||
@@ -24,5 +24,5 @@ clone() { | ||
factory(json) { | ||
return new Map(JSON.parse(json)); | ||
return new Map(json); | ||
}, | ||
typeName, | ||
}; |
@@ -17,3 +17,3 @@ const assert = require('assert'); | ||
const mapStringified = | ||
'{"$type":"Map","$value":"[[\\"foo\\",\\"bar\\"],[\\"hello\\",\\"world\\"]]"}'; | ||
'{"$type":"Map","$value":[["foo","bar"],["hello","world"]]}'; | ||
@@ -20,0 +20,0 @@ describe('Map', function() { |
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
97
11767