EAS Generation
Generate an EAS alert using EASjs
const { generateEASAlert } = require('@globaleas/easjs');
const header = 'ZCZC-CIV-ADR-020173+0100-3441707-ERN/LB-';
generateEASAlert(header)
Without any changes to the configuration, it will output the generated alert in the current working directory as output.wav
Generate an EAS alert with a custom configuration
// Import the MODES object for configuration
const { generateEASAlert, MODES } = require('@globaleas/easjs');
const header = 'ZCZC-CIV-ADR-020173+0100-3441707-ERN/LB-';
generateEASAlert(header, {
audioPath: 'alert-audio.mp3',
outputFile: 'final-alert.wav',
format: 'wav',
mode: MODES.DIGITAL
})
This will output the generated alert as final-alert.wav
in the current working directory.
Custom Parameters for Generation
audioPath
- The path to the audio file to use for the alert audio message.EASjs currently supports mp3 and wav files
outputFile
- The name of the output fileformat
- The format of the output file (wav or mp3)mode
- The mode of the alert:MODES.DEFAULT
- Style similar to a Digital Alert Systems DASDECMODES.DIGITAL
- Style similar to a SAGE Digital ENDECMODES.TRILITHIC
- Style similar to Trilithic EASy ENDECsMODES.NWS
- Similar toMODES.DEFAULT
but with a 1050 Hz attention tone
Last modified: 09 July 2025