1
0
mirror of https://github.com/devcode-it/openstamanager.git synced 2025-02-24 07:17:55 +01:00

18 lines
475 B
JavaScript
Raw Normal View History

// noinspection JSUnusedGlobalSymbols
/**
* Check if class/object A is the same as or a subclass of class B.
*/
export function subclassOf(A: Object, B: Object): boolean {
// noinspection JSUnresolvedVariable
return A && (A === B || A.prototype instanceof B);
}
/**
* Check if a string contains HTML code/tags
*/
export function containsHTML(string_: string): boolean {
// eslint-disable-next-line unicorn/better-regex
return /<[a-z][\s\S]*>/i.test(string_);
}