bitburner-src/utils/helpers/isString.ts

9 lines
319 B
TypeScript
Raw Normal View History

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