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 15685c1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion lib/config.service.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
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
Original file line number Diff line number Diff line change
@@ -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 15685c1

Please sign in to comment.