How to use the @netlify/config.LIFECYCLE.includes function in @netlify/config

To help you get started, we’ve selected a few @netlify/config examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github netlify / build / packages / build / src / plugins / child / validate.js View on Github external
const validateMethod = function(propName) {
  const propNameA = propName.replace(OVERRIDE_REGEXP, '')

  if (!LIFECYCLE.includes(propNameA) && LEGACY_LIFECYCLE[propNameA] === undefined) {
    throw new Error(`Invalid event '${propNameA}'.
Please use a valid event name. One of:
${serializeList(LIFECYCLE)}`)
  }
}