Skip to content

Commit

Permalink
pref():import lodash efficiently
Browse files Browse the repository at this point in the history
this is the recommended way to load only the methods needed instead of entire lodash.
  • Loading branch information
thematan committed Aug 30, 2023
1 parent 8e2c53d commit 5f267d1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion 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,
Expand Down
2 changes: 1 addition & 1 deletion lib/utils/merge-configs.util.ts
@@ -1,4 +1,4 @@
import { set } from 'lodash';
import set from 'lodash/set';

export function mergeConfigObject(
host: Record<string, any>,
Expand Down

0 comments on commit 5f267d1

Please sign in to comment.