Comparing version 1.0.0 to 1.0.1
{ | ||
"name": "mongot", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "MongoT is a modern ODM library for MongoDb.", | ||
@@ -5,0 +5,0 @@ "main": "src/index.js", |
@@ -0,0 +0,0 @@ import * as MongoDb from 'mongodb'; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ import * as MongoDb from 'mongodb'; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ import * as MongoDb from 'mongodb'; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ /// <reference types="node" /> |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ /// <reference types="node" /> |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ import * as MongoDb from 'mongodb'; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ import { SchemaMetadata } from "../document"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ export declare class Query { |
@@ -14,9 +14,23 @@ "use strict"; | ||
} | ||
if (Array.isArray(value)) { | ||
else if (Array.isArray(value)) { | ||
return value.map(x => this.normalize(x)); | ||
} | ||
return this.format(value); | ||
else if (value instanceof Date) { | ||
return value; | ||
} | ||
else if (Object.prototype.toString.call(value) === '[object Object]') { | ||
return this.format(value); | ||
} | ||
return value; | ||
} | ||
else if (typeof value === 'string' && value.length === 24 && /^[0-9a-f]{24}$/.test(value) === true) { | ||
return mongodb_1.ObjectID.createFromHexString(value); | ||
else if (typeof value === 'string') { | ||
if (value.length === 24) { | ||
if ('Z' === value.substr(-1) && true === /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.\d{3}Z$/.test(value)) { | ||
return new Date(value); | ||
} | ||
else if (true === /^[0-9a-f]{24}$/.test(value)) { | ||
return mongodb_1.ObjectID.createFromHexString(value); | ||
} | ||
} | ||
return value; | ||
} | ||
@@ -23,0 +37,0 @@ return value; |
import './metadata'; |
"use strict"; | ||
require("./metadata"); | ||
//# sourceMappingURL=index.js.map |
import './reflect'; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ declare namespace Reflect { |
@@ -0,0 +0,0 @@ import "./reflect"; |
@@ -0,0 +0,0 @@ "use strict"; |
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
120685
46
1667