nest-simple-config
Version:
A powerful and flexible configuration management library for NestJS applications. Supports JSON, YAML file loading, environment variable overrides, immutable configurations, and type-safe configuration access with dependency injection.
11 lines (10 loc) • 418 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.definedProps = void 0;
function definedProps(obj) {
return Object.fromEntries(Object.entries(obj)
.map(([k, v]) => [k, v ? v : undefined]) // 將null轉成undefined
// eslint-disable-next-line @typescript-eslint/no-unused-vars
.filter(([k, v]) => v !== undefined));
}
exports.definedProps = definedProps;