All Downloads are FREE. Search and download functionalities are using the official Maven repository.

concrete.templates.jaxrs.axios.code.v1.enumerable.ftl Maven / Gradle / Ivy

There is a newer version: 0.5.3-RC1
Show newest version
import { valueOf, toArray } from './constUtil'
export default {
<#list elements as e>
    /**
     * label: ${e.label}
     * desc: ${e.desc}
     * value: ${e.value}
     */
    ${e.key}: ${e.codeValue},

    _lableOf(v) {
        return this.labelOf(v)
    },
    _labelOf(v) {
        return this.labelOf(v)
    },
    labelOf(v){
        const o = valueOf(this, v)
        if (o) return o.key
        throw 'not found: ' + v
    },
    _toArray(values) {
        return this.toArray(values)
    },
    toArray(values){
        return toArray(this, values)
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy