import { writeFileSync } from 'fs' ; import beautify from 'json-beautify' ; /**
 * Sorts an array based off of the name of each element.
 */ function sort ( a , b ) { return ( a . name ?? a . uSen ?? a . event ) > ( b . name ?? b . uSen ?? b . event ) ? 1 : - 1 ; } param path param data param data export function write ( path , data , width ? ) { writeFileSync ( path , beautify ( data . sort ( sort ) , ( < unknown > null ) as any [ ] , 2 , width ?? 80 ) ) ; }