r37r0m0d3l/vicis

View on GitHub
src/core/defaults/defaultsConfig.ts

Summary

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

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

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