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

mongodb-extjson

Package Overview
Dependencies
Maintainers
3
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mongodb-extjson - npm Package Compare versions

Comparing version 2.1.2 to 2.1.3

10

CHANGELOG.md

@@ -0,1 +1,11 @@

<a name="2.1.3"></a>
## [2.1.3](https://github.com/mongodb-js/mongodb-extjson/compare/v2.1.2...v2.1.3) (2018-05-01)
### Bug Fixes
* **date:** fix date decode in relaxed mode ([#13](https://github.com/mongodb-js/mongodb-extjson/issues/13)) ([dc416aa](https://github.com/mongodb-js/mongodb-extjson/commit/dc416aa))
<a name="2.1.2"></a>

@@ -2,0 +12,0 @@ ## [2.1.2](https://github.com/mongodb-js/mongodb-extjson/compare/v2.1.1...v2.1.2) (2018-04-06)

2

dist/bundle.js

@@ -303,3 +303,3 @@ (function (global, factory) {

if (typeof d === 'string') date.setTime(Date.parse(d));else if (d instanceof BSON.Long) date.setTime(d.toNumber());
if (typeof d === 'string') date.setTime(Date.parse(d));else if (d instanceof BSON.Long) date.setTime(d.toNumber());else if (typeof d === 'number' && options.relaxed) date.setTime(d);
return date;

@@ -306,0 +306,0 @@ }

@@ -80,2 +80,3 @@ 'use strict';

else if (d instanceof BSON.Long) date.setTime(d.toNumber());
else if (typeof d === 'number' && options.relaxed) date.setTime(d);
return date;

@@ -82,0 +83,0 @@ }

{
"name": "mongodb-extjson",
"version": "2.1.2",
"version": "2.1.3",
"description": "MongoDB Extended JSON library",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -188,6 +188,8 @@ 'use strict';

it('should allow relaxed parsing', function() {
const dt = new Date(1452124800000);
const inputObject = {
int: { $numberInt: '500' },
long: { $numberLong: '42' },
double: { $numberDouble: '24' }
double: { $numberDouble: '24' },
date: { $date: { $numberLong: '1452124800000' } }
};

@@ -199,3 +201,4 @@

long: 42,
double: 24
double: 24,
date: dt
});

@@ -202,0 +205,0 @@ });

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