How to use the ember-form-builder/utilities/humanize function in ember-form-builder

To help you get started, we’ve selected a few ember-form-builder examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github nibynic / ember-form-builder / addon / components / form-builder / input.js View on Github external
defineProperty(this, key, computed(`content.{${key},attr,translationService.locale,builder.translationKey}`, function() {
      let originalValue = this.get(`content.${key}`);
      let attr = this.get('content.attr');
      let mappedKey = this.get('typeMapping')[key] || key;
      if (originalValue !== false) {
        return originalValue || this.get('content.translationService').t(
          this.get('content.builder.translationKey'), mappedKey, attr
        ) || (
          this.get('humanizedAttributes').includes(key) ? humanize(attr) : undefined
        );
      } else {
        return undefined;
      }
    }));
    return this.get(key);