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

1
import lampix from '@lampix/core';
2
3
lampix.getLampixInfo()
4
.then(console.log); // example { id: <unique-id>, version: '1.2.3', isSimulator: false }
Copied!
Copy link