import { ValueTransformer } from 'typeorm' ; export class LowerCaseTransformer implements ValueTransformer { to ( entityValue ) { return entityValue . toLocaleLowerCase ( ) ; } from ( databaseValue ) { return databaseValue ; } }