guardStringIncludesSome()
Last updated
Was this helpful?
Last updated
Was this helpful?
guardStringIncludesSome()
Guards the value to be a type or an instance of that includes some of the specified words/sentences.
Type
extends
AnyString
A generic type variable Obj
constrained by indicates captured type of the given via the and the parameter of the provided function type.
Payload
extends
object
=
object
value: Type
includes: string[]
callback?: ResultCallback<Type, { includes: typeof includes } & Payload>
payload?: Payload
value is Type
The Payload
generic type variable constrained by indicates the type of optional parameter of the supplied function and optional parameter of the function from which it captures its value.
The value of a generic type variable constrained by the , by default of the type captured from itself to check against the that contains some of the words/sentences from a given .
An of as words/sentences to be case-sensitive searched for within a given .
The optional callback of type with parameters, the that has been checked, the result
of this check, and payload
of generic type variable with optional properties from the provided payload
, to handle them before the result
return. By default, it uses resultCallback()
function.
The payload
parameter of given function consists of the includes
property of the given , and it can't be overwritten by the given parameter of the main function.
An optional of the generic type variable is assigned to the of the given function.
The return type is a as the result of its statement indicating the is a generic type variable by default of the type captured from the .
The return value is a indicating whether the provided is a type or an instance of that includes some of the specified words/sentences.