System

The System Aptitude provides the ability to access information about the user's system.

operatingSystem

operatingSystem returns a promise with a string that describes which operating system the Loop is running on.

import { system } from '@oliveai/ldk';

system.operatingSystem().then((os) => {
    console.log(os);
});

/*
 * This will print out one of:
 * windows
 * darwin (This will be returned for macOS)
 * linux
 */

getEnvironment

getEnvironment returns a promise with an object that contains the osVersion, oliveHelpsVersion, and the loopVersion.

import { system } from '@oliveai/ldk';

(async () => {
    const environment = await system.getEnvironment()
    console.log(environment.osVersion)
    console.log(environment.oliveHelpsVersion)
    console.log(environment.loopVersion)
});

Last updated