Comparing version 0.0.3 to 0.0.4
{ | ||
"name": "io.bson", | ||
"version": "0.0.3", | ||
"version": "0.0.4", | ||
"author": "Vitaly Anagorsky <vitaly@anagorsky.com>" | ||
} |
@@ -13,2 +13,4 @@ /* Buffalo by Marcello Bastea-Forte - zlib license */ | ||
var ISO_8601_FULL = /^\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d(\.\d+)?(([+-]\d\d:\d\d)|Z)?$/i | ||
// exports.DBRef = DBRef | ||
@@ -79,2 +81,5 @@ // exports.ObjectId = ObjectId | ||
} | ||
if (typeof element == 'string' && ISO_8601_FULL.test(element)) { | ||
return calculateElement(name, new Date(element)) | ||
} | ||
switch (typeof element) { | ||
@@ -170,2 +175,4 @@ case 'string': | ||
(element.multiline ? 'm' : '')) | ||
} else if (typeof element == 'string' && ISO_8601_FULL.test(element)) { | ||
return writeElement(buffer, offset, name, new Date(element)) | ||
} else switch (typeof element) { | ||
@@ -172,0 +179,0 @@ case 'string': |
Sorry, the diff of this file is not supported yet
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
41023
1201