Sha256: 08262d14ab6f7d169b5aeac68cf88d15878535bdad73f1c88e9c0b5d91948de2

Contents?: true

Size: 658 Bytes

Versions: 3

Compression:

Stored size: 658 Bytes

Contents

import { dasherize } from '@ember/string';
import { InternalHelperReference } from '../utils/references';
function classHelper({ positional }) {
    let path = positional.at(0);
    let args = positional.length;
    let value = path.value();
    if (value === true) {
        if (args > 1) {
            return dasherize(positional.at(1).value());
        }
        return null;
    }
    if (value === false) {
        if (args > 2) {
            return dasherize(positional.at(2).value());
        }
        return null;
    }
    return value;
}
export default function (_vm, args) {
    return new InternalHelperReference(classHelper, args.capture());
}

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
discourse-ember-source-3.6.0.0 dist/es/@ember/-internals/glimmer/lib/helpers/-class.js
discourse-ember-source-3.5.1.1 dist/es/ember-glimmer/lib/helpers/-class.js
discourse-ember-source-3.5.1.0 dist/dist/es/ember-glimmer/lib/helpers/-class.js