@mrnafisia/type-query
Advanced tools
Comparing version 1.2.3 to 1.2.4
@@ -5,12 +5,12 @@ import Decimal from 'decimal.js'; | ||
declare const Cast: { | ||
boolean: <N extends boolean>(v: unknown, nullable: N) => NullableType<N, boolean> | undefined; | ||
number: <N_1 extends boolean>(v: unknown, nullable: N_1) => NullableType<N_1, number> | undefined; | ||
integer: <N_2 extends boolean>(v: unknown, nullable: N_2) => NullableType<N_2, number> | undefined; | ||
bigInt: <N_3 extends boolean>(v: unknown, nullable: N_3) => NullableType<N_3, bigint> | undefined; | ||
decimal: <N_4 extends boolean>(v: unknown, nullable: N_4) => NullableType<N_4, Decimal> | undefined; | ||
string: <N_5 extends boolean>(v: unknown, nullable: N_5) => NullableType<N_5, string> | undefined; | ||
date: <N_6 extends boolean>(v: unknown, nullable: N_6) => NullableType<N_6, Date> | undefined; | ||
json: <N_7 extends boolean>(v: unknown, nullable: N_7) => NullableType<N_7, Json> | undefined; | ||
boolean: <N extends boolean>(v: unknown, nullable?: N) => NullableType<N, boolean> | undefined; | ||
number: <N_1 extends boolean>(v: unknown, nullable?: N_1) => NullableType<N_1, number> | undefined; | ||
integer: <N_2 extends boolean>(v: unknown, nullable?: N_2) => NullableType<N_2, number> | undefined; | ||
bigInt: <N_3 extends boolean>(v: unknown, nullable?: N_3) => NullableType<N_3, bigint> | undefined; | ||
decimal: <N_4 extends boolean>(v: unknown, nullable?: N_4) => NullableType<N_4, Decimal> | undefined; | ||
string: <N_5 extends boolean>(v: unknown, nullable?: N_5) => NullableType<N_5, string> | undefined; | ||
date: <N_6 extends boolean>(v: unknown, nullable?: N_6) => NullableType<N_6, Date> | undefined; | ||
json: <N_7 extends boolean>(v: unknown, nullable?: N_7) => NullableType<N_7, Json> | undefined; | ||
}; | ||
export { Cast }; | ||
//# sourceMappingURL=cast.d.ts.map |
@@ -10,2 +10,3 @@ "use strict"; | ||
boolean: function (v, nullable) { | ||
if (nullable === void 0) { nullable = false; } | ||
if (nullable && (v === null || (typeof v === 'string' && v.toLowerCase() === 'null'))) { | ||
@@ -31,2 +32,3 @@ return null; | ||
number: function (v, nullable) { | ||
if (nullable === void 0) { nullable = false; } | ||
if (nullable && (v === null || (typeof v === 'string' && v.toLowerCase() === 'null'))) { | ||
@@ -46,2 +48,3 @@ return null; | ||
integer: function (v, nullable) { | ||
if (nullable === void 0) { nullable = false; } | ||
if (nullable && (v === null || (typeof v === 'string' && v.toLowerCase() === 'null'))) { | ||
@@ -54,2 +57,3 @@ return null; | ||
bigInt: function (v, nullable) { | ||
if (nullable === void 0) { nullable = false; } | ||
if (nullable && (v === null || (typeof v === 'string' && v.toLowerCase() === 'null'))) { | ||
@@ -75,2 +79,3 @@ return null; | ||
decimal: function (v, nullable) { | ||
if (nullable === void 0) { nullable = false; } | ||
if (nullable && (v === null || (typeof v === 'string' && v.toLowerCase() === 'null'))) { | ||
@@ -97,2 +102,3 @@ return null; | ||
string: function (v, nullable) { | ||
if (nullable === void 0) { nullable = false; } | ||
if (nullable && (v === null || (typeof v === 'string' && v.toLowerCase() === 'null'))) { | ||
@@ -113,2 +119,3 @@ return null; | ||
date: function (v, nullable) { | ||
if (nullable === void 0) { nullable = false; } | ||
if (nullable && (v === null || (typeof v === 'string' && v.toLowerCase() === 'null'))) { | ||
@@ -130,2 +137,3 @@ return null; | ||
json: function (v, nullable) { | ||
if (nullable === void 0) { nullable = false; } | ||
if (nullable && (v === null || (typeof v === 'string' && v.toLowerCase() === 'null'))) { | ||
@@ -132,0 +140,0 @@ return null; |
{ | ||
"name": "@mrnafisia/type-query", | ||
"version": "1.2.3", | ||
"version": "1.2.4", | ||
"description": "mini-orm with full type support for postgres.", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
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
586086
9031