Sha256: abb6dc278a7af9c7612f1837fd7eb2cec6655a13bc0699c6ebeea6d7c72d4a7a
Contents?: true
Size: 635 Bytes
Versions: 3
Compression:
Stored size: 635 Bytes
Contents
import { dasherize } from '@ember/string'; import { InternalHelperReference } from '../utils/references'; function normalizeClass({ positional }) { let classNameParts = positional .at(0) .value() .split('.'); let className = classNameParts[classNameParts.length - 1]; let value = positional.at(1).value(); if (value === true) { return dasherize(className); } else if (!value && value !== 0) { return ''; } else { return String(value); } } export default function (_vm, args) { return new InternalHelperReference(normalizeClass, args.capture()); }
Version data entries
3 entries across 3 versions & 1 rubygems