text: "use strict";
  /*
   * Copyright (c) 2018, salesforce.com, inc.
   * All rights reserved.
   * Licensed under the BSD 3-Clause license.
   * For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
   */
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.coerceJsonArray = exports.coerceJsonMap = exports.coerceAnyJson = void 0;
  const as_1 = require("./as");
  const is_1 = require("./is");
  // underlying function
  function coerceAnyJson(value, defaultValue) {
      return is_1.isAnyJson(value) ? value : defaultValue;
  }
  exports.coerceAnyJson = coerceAnyJson;
  // underlying function
  function coerceJsonMap(value, defaultValue) {
      return as_1.asJsonMap(coerceAnyJson(value)) || defaultValue;
  }
  exports.coerceJsonMap = coerceJsonMap;
  // underlying method
  function coerceJsonArray(value, defaultValue) {
      return as_1.asJsonArray(coerceAnyJson(value)) || defaultValue;
  }
  exports.coerceJsonArray = coerceJsonArray;
  //# sourceMappingURL=coerce.js.map