Files
bitburner-src/src/utils/helpers/isString.ts
T
2021-09-25 14:42:57 -04:00

9 lines
319 B
TypeScript

/**
* Checks whether the value passed in can be considered a string.
* @param value The value to check if it is a string.
*/
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
export function isString(value: any): boolean {
return typeof value === "string" || value instanceof String;
}