equals
Compares the string with another string using strict equality. The comparison is case-sensitive and does not trim whitespace.
Usage
ts
const isSameRole = 'admin'.equals('admin');
// trueParameters
| Name | Type | Description |
|---|---|---|
value | string | String to compare against. |
Returns
true when both strings are equal.
Type signature
ts
interface String {
equals(value: string): boolean;
}