Conversion

trimStart
1
2
3
4
5
6
7
    _id: EType.objectId,
    firstName: <ISchemaProperty>{
        __type: EType.string,
        conversion: <IPropertyConversion>{
            trimStart: true
        }
    }
trimEnd
1
2
3
4
5
6
7
    _id: EType.objectId,
    firstName: <ISchemaProperty>{
        __type: EType.string,
        conversion: <IPropertyConversion>{
            trimEnd: true
        }
    }
trim
1
2
3
4
5
6
7
    _id: EType.objectId,
    firstName: <ISchemaProperty>{
        __type: EType.string,
        conversion: <IPropertyConversion>{
            trim: true
        }
    }
toLowerCase
1
2
3
4
5
6
7
    _id: EType.objectId,
    firstName: <ISchemaProperty>{
        __type: EType.string,
        conversion: <IPropertyConversion>{
            toLowerCase: true
        }
    }
toUpperCase
1
2
3
4
5
6
7
    _id: EType.objectId,
    firstName: <ISchemaProperty>{
        __type: EType.string,
        conversion: <IPropertyConversion>{
            toUpperCase: true
        }
    }
conversionFun
    _id: EType.objectId,
    firstName: <ISchemaProperty>{
        __type: EType.string,
        conversions: <IPropertyConversion>{
            conversionFun: (firstName, fullObj) => {
                if (firstName) return (firstName + "_IND");
                else return (firstName);
            },
        }
    }
encryption
1
2
3
4
5
6
7
    _id: EType.objectId,
    firstName: <ISchemaProperty>{
        __type: EType.string,
        conversion: <IPropertyConversion>{
            encryption: true
        }
    }
hashing
1
2
3
4
5
6
7
    _id: EType.objectId,
    firstName: <ISchemaProperty>{
        __type: EType.string,
        conversion: <IPropertyConversion>{
            hashing: true
        }
    }