UNPKG

514 BJavaScriptView Raw
1"use strict";
2Object.defineProperty(exports, "__esModule", { value: true });
3exports.isString = void 0;
4/**
5 * @name isString
6 * @summary Tests for a string.
7 * @description
8 * Checks to see if the input value is a JavaScript string.
9 * @example
10 * <BR>
11 *
12 * ```javascript
13 * import { isString } from '@polkadot/util';
14 *
15 * console.log('isString', isString('test')); // => true
16 * ```
17 */
18function isString(value) {
19 return typeof value === 'string' || value instanceof String;
20}
21exports.isString = isString;