igbopie/spherov2.js

View on GitHub
lib/src/commands/something-api.ts

Summary

Maintainability
A
1 hr
Test Coverage
B
80%
import {
  CommandGenerator,
  DeviceId,
  SomethingApi,
  ICommandWithRaw,
} from './types';

export default (generator: CommandGenerator) => {
  const encode = generator(DeviceId.somethingAPI);
  return {
    something5: (): ICommandWithRaw =>
      encode({
        commandId: SomethingApi.something5,
      }),
  };
};