Skip to content

Commit

Permalink
refactor: minor refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
oderayi committed Oct 14, 2024
1 parent 590639b commit ae89149
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/lib/utils/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,10 @@ const fspiopToIsoTransferStateMap: GenericObject = {
export const generateID = (idGenType: ID_GENERATOR_TYPE = ID_GENERATOR_TYPE.ulid, config: GenericObject = {}): string => {
switch (idGenType) {
case ID_GENERATOR_TYPE.ulid:
return idGenerator({ type: idGenType, ...config })();
case ID_GENERATOR_TYPE.uuid:
return idGenerator({ type: idGenType, ...config })();
return idGenerator({ ...config, type: idGenType })();
default:
return idGenerator({ type: ID_GENERATOR_TYPE.ulid, ...config })();
return idGenerator({ ...config, type: ID_GENERATOR_TYPE.ulid })();
}
}

Expand Down

0 comments on commit ae89149

Please sign in to comment.