add: add utils from conver enums
All checks were successful
Publish / Publish Job (push) Successful in 43s
All checks were successful
Publish / Publish Job (push) Successful in 43s
This commit is contained in:
@@ -1 +1,2 @@
|
|||||||
export * from "./enums";
|
export * from './enums'
|
||||||
|
export * from './utils'
|
||||||
|
|||||||
6
lib/utils/conver-enum.ts
Normal file
6
lib/utils/conver-enum.ts
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
export function convertEnum<T extends object>(
|
||||||
|
target: T,
|
||||||
|
value: string
|
||||||
|
): T[keyof T] {
|
||||||
|
return (target as any)[value]
|
||||||
|
}
|
||||||
1
lib/utils/index.ts
Normal file
1
lib/utils/index.ts
Normal file
@@ -0,0 +1 @@
|
|||||||
|
export * from './conver-enum'
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@lendry-erp/common",
|
"name": "@lendry-erp/common",
|
||||||
"version": "1.0.1",
|
"version": "1.0.2",
|
||||||
"description": "Core shared components for Lendry-ERP microservice ecosystem",
|
"description": "Core shared components for Lendry-ERP microservice ecosystem",
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
"type": "dist/index.d.ts",
|
"type": "dist/index.d.ts",
|
||||||
|
|||||||
Reference in New Issue
Block a user