UNPKG

@octokit/auth-token

Version:

GitHub API token authentication for browsers and Node.js

8 lines (7 loc) 185 B
const b64url = "(?:[a-zA-Z0-9_-]+)"; const sep = "\\."; const jwtRE = new RegExp(`^${b64url}${sep}${b64url}${sep}${b64url}$`); const isJWT = jwtRE.test.bind(jwtRE); export { isJWT };