function normalizeEncoding(enc) {
  var nenc = _normalizeEncoding(enc);
  if (typeof nenc !== 'string' && (Buffer.isEncoding === isEncoding || !isEncoding(enc))) throw new Error('Unknown encoding: ' + enc);
  return nenc || enc;
}
Creates validating function for passed schema with asynchronous loading of missing schemas.
`loadSchema` option should be a function that accepts schema uri and returns promise that resolves with the schema.
@this  Ajv
@param {Object}   schema schema object
@param {Boolean}  meta optional true to compile meta-schema; this parameter can be skipped
@param {Function} callback an optional node-style callback, it is called with 2 parameters: error (or null) and validating function.
@return {Promise} promise that resolves with a validating function.