optionsHaveException.js 481 B

123456789101112131415161718
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", {
  3. value: true
  4. });
  5. exports["default"] = _default;
  6. /**
  7. * Check if an options object contains a certain `except` keyword.
  8. * It will look for an `except` property whose value should
  9. * be an array of keywords.
  10. *
  11. * @param {object} options
  12. * @param {string} exceptionName
  13. * @return {boolean}
  14. */
  15. function _default(options, exceptionName) {
  16. return options && options.except && options.except.includes(exceptionName);
  17. }