Skip to main content

isFilledString

Validates if the supplied input is a string that is not empty.

Signature

isFilledString(input: any): boolean

Parameters

NameTypeOptionalDescription
inputanyNoInput to validate.

Return value

Returns true if the input is a string with content.

Example

import { isFilledString } from "@tripetto/builder";

isFilledString("ABC"); // Returns `true`
isFilledString(""); // Returns `false`
isFilledString(1); // Returns `false`