Comparing version 0.9.8 to 0.9.9
@@ -20,2 +20,8 @@ ## [Unreleased] | ||
## [0.9.9] - 2018-07-02 | ||
### Fixed | ||
- Date type schema fields are now saved as Date when they are introduced as string | ||
## [0.9.8] - 2018-06-08 | ||
@@ -489,2 +495,3 @@ | ||
[0.9.9]: https://github.com/Yonirt/moltyjs/compare/v0.9.8...v0.9.9 | ||
[0.9.8]: https://github.com/Yonirt/moltyjs/compare/v0.9.7...v0.9.8 | ||
@@ -491,0 +498,0 @@ [0.9.7]: https://github.com/Yonirt/moltyjs/compare/v0.9.6...v0.9.7 |
@@ -402,2 +402,7 @@ 'use strict'; | ||
// Date type as string should be converted to date type | ||
if (schema[key].type === Date && typeof payload[key] === typeof 'String') { | ||
payload[key] = new Date(payload[key]); | ||
} | ||
// Array | ||
@@ -404,0 +409,0 @@ if (!schema[key].type && isArray(schema[key]) && payload[key] && payload[key].length > 0) { |
{ | ||
"name": "moltyjs", | ||
"version": "0.9.8", | ||
"version": "0.9.9", | ||
"description": "A tiny ODM for MongoDB with multy tenancy support.", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
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
131618
2449