From 5f267d115b7cc3620af64d5351ecdaacc24d035d Mon Sep 17 00:00:00 2001 From: Matan Cohen Date: Wed, 30 Aug 2023 18:42:20 +0000 Subject: [PATCH] pref():import lodash efficiently this is the recommended way to load only the methods needed instead of entire lodash. --- lib/config.service.ts | 4 +++- lib/utils/merge-configs.util.ts | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/config.service.ts b/lib/config.service.ts index 983e2604..22a89f14 100644 --- a/lib/config.service.ts +++ b/lib/config.service.ts @@ -1,6 +1,8 @@ import { Inject, Injectable, Optional } from '@nestjs/common'; import { isUndefined } from '@nestjs/common/utils/shared.utils'; -import { get, has, set } from 'lodash'; +import get from 'lodash/get'; +import has from 'lodash/has'; +import set from 'lodash/set'; import { CONFIGURATION_TOKEN, VALIDATED_ENV_PROPNAME, diff --git a/lib/utils/merge-configs.util.ts b/lib/utils/merge-configs.util.ts index 5d6ef86b..232e3ea2 100644 --- a/lib/utils/merge-configs.util.ts +++ b/lib/utils/merge-configs.util.ts @@ -1,4 +1,4 @@ -import { set } from 'lodash'; +import set from 'lodash/set'; export function mergeConfigObject( host: Record,