Checks if value starts with searchString.

startsWith if value does not start with searchString.

const startsWithId = startsWith("ID: ");

startsWithId("123"); // Error: startsWith
startsWithId("ID: 123"); // passes
  • Parameters

    • input: string

      The characters to be searched for at the start of value.

    Returns Assertion<unknown>