imports/vx/both/code/util.js
/**
     * Make an array of objects based on the codes, each of which contains a code and localized value.
     *
     * @param {string} code Enumeration code name (see codes.js).
     * @returns {array} Array of properties and values.
     */
Make an array of objects based on the codes, each of which contains a code and localized value.
@param {string} code Enumeration code name .
@returns {array} Array of properties and values.
Make an array of objects based on the codes each of which contains a code and localized value . @param { string } code Enumeration code name . @returns { array } Array of properties and values .
makeCodeArray(code, includeBlank) {
        const codeArray = _.map(Meteor.i18nMessages.codes[code], (value, propertyName) => {
            let localized = Util.i18n("codes." + code + "." + propertyName)
            return { code : propertyName, localized : localized }
        })
        if (includeBlank) {
            codeArray.unshift( { code: "", localized: "" } )
        }
        return codeArray
    }
makeCodeArray ( code , includeBlank ) { const codeArray = _ . map ( Meteor . i18nMessages . codes [ code ] , ( value , propertyName ) => { let localized = Util . i18n ( "codes." + code + "." + propertyName ) return { code : propertyName , localized : localized } } ) if ( includeBlank ) { codeArray . unshift ( { code : "" , localized : "" } ) } return codeArray }
Make an array of objects based on the codes, each of which contains a code and localized value.
Make an array of objects based on the codes each of which contains a code and localized value .