tutorials/cleaning-up-at-scale/index.js
/**
 * Validates that a request payload contains the expected fields.
 *
 * @param {!object} payload the request payload to validate.
 * @return {!object} the payload object.
 */
Validates that a request payload contains the expected fields.
@param {!object} payload the request payload to validate.
@return {!object} the payload object.
Validates that a request payload contains the expected fields . @param { !object } payload the request payload to validate . @return { !object } the payload object .
function _validatePayload (payload) {
  if (!payload.label) {
    throw new Error('Attribute \'label\' missing from payload');
  }
  return payload;
}
function _validatePayload ( payload ) { if ( ! payload . label ) { throw new Error ( 'Attribute \'label\' missing from payload' ) ; } return payload ; }
Validates that a request payload contains the expected fields.
Validates that a request payload contains the expected fields .