smos-js

Javascript utility library for SMoS

Usage no npm install needed!

<script type="module">
  import smosJs from 'https://cdn.skypack.dev/smos-js';
</script>

README

SMoSNpm

Javascript utility library for SMoS

Install

npm install smos-js

Usage examples

import { Component } from '@angular/core';
import { SmosJsService } from 'smos-js'

@Component({
  selector: 'app-root',
  templateUrl: './app.component.html'
})
export class AppComponent {

  constructor(private smosService: SmosJsService) {}

  public HandleIncomingHexString(hexString: string): SMoSObject | null {
    return this.smosService.DecodeMessageFromHexString(hexString);
  }

  public HandleOutgoingMessage(message: SMoSObject): string {
    return this.smosService.EncodeMessageToHexString(message);
  }

}