---
title: "isString"
description: "A TypeScript type guard that checks whether a value is a string, narrowing the type so string methods can be used safely in your code."
canonical_url: "https://core.mhaibaraai.cn/en/docs/validators/is-string"
---
# isString

> A TypeScript type guard that checks whether a value is a string, narrowing the type so string methods can be used safely in your code.

## Usage

Check whether a value is a string. This is a TypeScript type guard function.

```ts
import { isString } from '@movk/core'

isString('hello') // => true
isString('') // => true
isString(123) // => false
```

## API

`isString(value: any): value is string`

### Parameters

**value** (`any`) *required*: The value to check.

### Returns

**boolean**: Returns true if the value is a string, otherwise false.

## Changelog

See commit history for [src/validators/isString.ts](https://github.com/mhaibaraai/movk-core/commits/main/src/validators/isString.ts).

---

- [GitHub](https://github.com/mhaibaraai/movk-core/blob/main/src/validators/isString.ts)


## Sitemap

See the full [sitemap](https://core.mhaibaraai.cn/sitemap.md) for all pages.
