UNPKG

otpauth

Version:

One Time Password (HOTP/TOTP) library for Node.js, Deno and browsers

10 lines (7 loc) 215 B
import { globalThis } from './global-this'; /** * Detect if running in Node.js. * @type {boolean} */ const isNode = Object.prototype.toString.call(globalThis.process) === '[object process]'; export { isNode };