getLampixInfo

Retrieve environment (Lampix or simulator) information.

Returns

(Promise<LampixInfo>): A promise that fulfills with a plain descriptor object with the following properties:

  • id (string): Unique ID for Lampix or simulation

  • version (string): Current version of Lampix or the simulator

  • isSimulator (boolean): Whether the current environment is a simulation or Lampix

Example

import lampix from '@lampix/core';

lampix.getLampixInfo()
  .then(console.log); // example { id: <unique-id>, version: '1.2.3', isSimulator: false }

Last updated