packages/remark-stringify/lib/set-options.js
function encodeFactory(type) {
  var options = {}

  if (type === 'false') {
    return identity
  }

  if (type === 'true') {
    options.useNamedReferences = true
  }

  if (type === 'escape') {
    options.escapeOnly = true
    options.useNamedReferences = true
  }

  return wrapped

  // Encode HTML entities using the bound options.
  function wrapped(value) {
    return encode(value, options)
  }
}
function encodeFactory(type) {
  var options = {}

  if (type === 'false') {
    return identity
  }

  if (type === 'true') {
    options.useNamedReferences = true
  }

  if (type === 'escape') {
    options.escapeOnly = true
    options.useNamedReferences = true
  }

  return wrapped

  // Encode HTML entities using the bound options.
  function wrapped(value) {
    return encode(value, options)
  }
}
function encodeFactory ( type ) { var options = { } if ( type === 'false' ) { return identity } if ( type === 'true' ) { options . useNamedReferences = true } if ( type === 'escape' ) { options . escapeOnly = true options . useNamedReferences = true } return wrapped // Encode HTML entities using the bound options. function wrapped ( value ) { return encode ( value , options ) } }
Factory to encode HTML entities.  Creates a no-operation function when `type` is `'false'`, a function which encodes using named references when `type` is `'true'`, and a function which encodes using numbered references when `type` is `'numbers'`.
Factory to encode HTML entities . Creates a no - operation function when type is false a function which encodes using named references when type is true and a function which encodes using numbered references when type is numbers .