Skip to content
On this page

isString

提供一个方便的方式来判断一个值是否为字符串类型

引入方式

ESM

javascript
import { isString } from "tool-assistant;

示例

javascript
// 引入 isString 函数
import { isString } from "tool-assistant";

// 定义一个变量
const value = "Hello, world!";

// 使用 isString 函数判断值是否为字符串类型
const result = isString(value);

// 打印结果
console.log(result); // 输出 true

Released under the MIT License.