Skip to content

Commit

Permalink
Merge pull request #250 from contentful/feat/remove-node-module-depen…
Browse files Browse the repository at this point in the history
…dency

feat(node): remove native module dependency
  • Loading branch information
marcolink authored Jan 21, 2022
2 parents 672cbad + 478f637 commit 16e2114
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/get-user-agent.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import os from 'os'

import { isNode, getNodeVersion, isReactNative, getWindow } from './utils'

function getBrowserOS(): string | null {
Expand Down Expand Up @@ -32,8 +30,8 @@ function getBrowserOS(): string | null {
type PlatformMap = Record<string, 'Android' | 'Linux' | 'Windows' | 'macOS'>

function getNodeOS(): string | null {
const platform = os.platform() || 'linux'
const version = os.release() || '0.0.0'
const platform = process.platform || 'linux'
const version = process.version || '0.0.0'
const platformMap: PlatformMap = {
android: 'Android',
aix: 'Linux',
Expand Down

0 comments on commit 16e2114

Please sign in to comment.