(self: string): self is ""Checks whether a string is empty.
Example (Checking for empty strings)
import { String } from "effect"
import * as assert from "node:assert"
assert.deepStrictEqual(String.isEmpty(""), true)
assert.deepStrictEqual(String.isEmpty("a"), false)predicates
Source effect/String.ts:4021 lines
export const const isEmpty: (
self: string
) => self is ""
Checks whether a string is empty.
Example (Checking for empty strings)
import { String } from "effect"
import * as assert from "node:assert"
assert.deepStrictEqual(String.isEmpty(""), true)
assert.deepStrictEqual(String.isEmpty("a"), false)
isEmpty = (self: stringself: string): self: stringself is "" => self: stringself.String.length: numberReturns the length of a String object.
length === 0