test: add keys folder
This commit is contained in:
@@ -3,18 +3,8 @@ import Decimal from "decimal.js";
|
||||
import { ValueTransformer } from "typeorm";
|
||||
|
||||
export class DecimalTransformer implements ValueTransformer {
|
||||
// to(value: Decimal | string | number): string {
|
||||
// return new Decimal(value).toString();
|
||||
// }
|
||||
|
||||
// from(value: string): number {
|
||||
// return new Decimal(value).toNumber();
|
||||
// }
|
||||
|
||||
to(value: Decimal | number | null): string | null {
|
||||
if (value === null) return "0";
|
||||
|
||||
return value instanceof Decimal ? value.toString() : new Decimal(value).toString();
|
||||
to(value: Decimal | null): string | null {
|
||||
return value ? value.toString() : "0";
|
||||
}
|
||||
|
||||
from(value: string | null): number {
|
||||
|
||||
Reference in New Issue
Block a user