"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = escape;
/*
 * @flow
 */

const encoded = {
  '&': '&',
  '<': '&lt;',
  '>': '&gt;',
  '/': '&#x2F;',
  "'": '&#x27;',
  '"': '&quot;'
};
function escape(str /*: string*/) /*: string*/{
  return str.replace(/[&<>\/'"]/g, function (char) {
    return encoded[char];
  });
}