'use strict';

var core = require('./core.js');
var formatSmart = require('./util/format-smart.js');
var formatBasic = require('./util/format-basic.js');

/**
 * @typedef {import('./core.js').CoreOptions & import('./util/format-smart.js').FormatSmartOptions} Options
 * @typedef {import('./core.js').CoreOptions} LightOptions
 */


/**
 * Encode special characters in `value`.
 *
 * @param {string} value
 *   Value to encode.
 * @param {Options} [options]
 *   Configuration.
 * @returns {string}
 *   Encoded value.
 */
function stringifyEntities(value, options) {
  return core.core(value, Object.assign({format: formatSmart.formatSmart}, options))
}

/**
 * Encode special characters in `value` as hexadecimals.
 *
 * @param {string} value
 *   Value to encode.
 * @param {LightOptions} [options]
 *   Configuration.
 * @returns {string}
 *   Encoded value.
 */
function stringifyEntitiesLight(value, options) {
  return core.core(value, Object.assign({format: formatBasic.formatBasic}, options))
}

exports.stringifyEntities = stringifyEntities;
exports.stringifyEntitiesLight = stringifyEntitiesLight;
//# sourceMappingURL=index.js.map
