MCPcopy Create free account
hub / github.com/sendgrid/sendgrid-nodejs / _createCheckThatThrows

Method _createCheckThatThrows

packages/helpers/classes/mail.js:647–653  ·  view source on GitHub ↗

* Create a check out of a callback. If the callback * returns false, the check will throw an error.

(check, errorString)

Source from the content-addressed store, hash-verified

645 * returns false, the check will throw an error.
646 */
647 _createCheckThatThrows(check, errorString) {
648 return (propertyName, value) => {
649 if (!check(value)) {
650 throw new Error(errorString);
651 }
652 };
653 }
654
655 /**
656 * Set an array property after checking that the new value is an

Callers 2

setSendAtMethod · 0.95
_doArrayCheckMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected