Skip to content

Commit d47e0af

Browse files
refactor(uuid): remove unnecesarry wrapper fn
1 parent 09b21dd commit d47e0af

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

src/mapper/mapper.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import {v4 as uuidv4} from 'uuid'
12
import { Metadata } from '../decorator/metadata/metadata'
23
import { metadataForClass, metadataForProperty } from '../decorator/metadata/metadata-helper'
34
import { Key, PropertyMetadata } from '../decorator/metadata/property-metadata.model'
@@ -16,7 +17,7 @@ import { Binary } from './type/binary.type'
1617
import { EnumType } from './type/enum.type'
1718
import { NullType } from './type/null.type'
1819
import { UndefinedType } from './type/undefined.type'
19-
import { typeOf, typeOfFromDb, uuidv4 } from './util'
20+
import { typeOf, typeOfFromDb } from './util'
2021

2122
const mapperForType: Map<AttributeValueType, MapperForType<any, any>> = new Map()
2223

src/mapper/util.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import { isNumber, isString } from 'lodash'
2-
import {v4} from 'uuid'
32
import { AttributeCollectionType, AttributeType } from './type/attribute-type.type'
43
import { AttributeValueType } from './type/attribute-value-type.type'
54
import { Attribute } from './type/attribute.type'
@@ -252,7 +251,3 @@ export function typeName(type: any): 'Null' | 'Undefined' | string {
252251

253252
throw new Error(`was not able to resolve type name for type ${type}`)
254253
}
255-
256-
export function uuidv4() {
257-
return v4()
258-
}

0 commit comments

Comments
 (0)