bitburner-src/utils/helpers/isString.ts
2018-07-08 20:15:06 -04:00

8 lines
245 B
TypeScript

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