1.0.1 • Published 4 years ago

iqos v1.0.1

Weekly downloads
2
License
MIT
Repository
github
Last release
4 years ago

iQOS

Not official iQOS Device BLE Communication Library, written in TypeScript, using web-bluetooth api.

Getting started

Docs

Installing Library

# Using Yarn
yarn add iqos

or

# Using NPM
npm i -S iqos

Working with Library

import { iQOS } from 'iqos';
// Or using default export:
// import iQOS from 'iqos';

const handleUpdate = (iqosInstance) => {
    console.log(iqosInstance.batteryValue); // Example output -> {holderReady: true, case: 100}
}

// For Browser use: 
const iqos = new iQOS(navigator.bluetooth, handleUpdate);

console.log(iqos.batteryValue); // Example output -> {holderReady: true, case: 100}

iQOS is a trademark of Philip Morris International.