1
0
mirror of https://github.com/sasjs/adapter.git synced 2026-01-06 12:10:04 +00:00
Files
adapter/src/utils/isLoginRequired.ts
2020-09-01 11:51:17 +01:00

6 lines
187 B
TypeScript

export const isLogInRequired = (response: string): boolean => {
const pattern: RegExp = /<form.+action="(.*Logon[^"]*).*>/gm
const matches = pattern.test(response)
return matches
}