UNPKG

@livy/util

Version:
21 lines (20 loc) 649 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.EOL = exports.isBrowser = exports.isNodeJs = void 0; /** * Check whether the current runtime is Node.js */ exports.isNodeJs = typeof process !== 'undefined' && typeof process.release === 'object' && process.release.name === 'node'; /** * Check whether the current runtime is a browser (or JSDOM) */ exports.isBrowser = typeof self === 'object' && self !== null && self.self === self && typeof self.navigator === 'object'; /** * The appropriate line ending character(s) to use */ exports.EOL = exports.isNodeJs ? require('os').EOL : '\n';