r37r0m0d3l/vicis

View on GitHub
src/core/nullish/nullishConfig.ts

Summary

Maintainability
A
40 mins
Test Coverage
import { INullish } from "../../interface/config/INullish";

import { checkIsObjectLike } from "../../util/check/isObjectLike";

/**
 * @name nullishConfig
 * @throws TypeError
 * @param {Object.<string, *>} propertyNullishValues
 * @returns {Object}
 */
export function nullishConfig(propertyNullishValues: INullish): INullish {
  if (!checkIsObjectLike(propertyNullishValues)) {
    throw new TypeError("'Defaults' should be an object");
  }
  return propertyNullishValues;
}