throwIfDoesContain
Stentor API Reference / stentor-utils/src / throwIfDoesContain
Function: throwIfDoesContain()
throwIfDoesContain(
obj,bannedAttrs,onError):void
Defined in: packages/stentor-utils/src/object/index.ts:106
A validation function that can check if an object contains an attribute that is should not have.
Parameters​
obj​
object
The object to check.
bannedAttrs​
string[]
onError​
ValidationErrorHandler = defaultValidationErrorHandler
An optional error handler that allows for custom messages or actions. The keys passed in will be the keys that are banned which are contained in the item.
Returns​
void