@globaleas/easjs

0.0.3 • Public • Published

easJSlogo

An open source EAS library created by the community, for the community

SAME EAS

This project is currently in development.

Installation

You can install the entire EASjs library by running:

  cd my-project
  npm install @globaleas/easjs

Usage/Examples

To decode a SAME header using EASjs:

const samedecoder = require('@globaleas/easjs');

const header = "ZCZC-CIV-ADR-020173+0100-3441707-ERN/LB-";
const decoder = samedecoder(header);
console.log(decoder);

Output:

{
  organization: 'The Civil Authorities have issued ',
  event: 'Administrative Message',
  locations: 'Sedgwick, KS',
  timing: { start: '5:32 PM', end: '6:32 PM' },
  sender: 'ERN/LB',
  formatted: 'The Civil Authorities have issued a Administrative Message for Sedgwick, KS; beginning at 5:32 PM and ending at 6:32 PM. Message from ERN/LB'
}

To grab a specific value from the decoded data:

const samedecoder = require('@globaleas/easjs');

const header = "ZCZC-CIV-ADR-020173+0100-3441707-ERN/LB-";
const decoder = samedecoder(header);
console.log(decoder.event);

Output:

"Administrative Message"

Support

For support or queries, open a issue here on GitHub or email developers@globaleas.org

Readme

Keywords

Package Sidebar

Install

npm i @globaleas/easjs

Weekly Downloads

10

Version

0.0.3

License

GPL-3.0-or-later

Unpacked Size

206 kB

Total Files

7

Last publish

Collaborators

  • camsea28
  • imharv