How to use the ember-intl/utils/streams.readHash function in ember-intl

To help you get started, we’ve selected a few ember-intl 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 ember-intl / ember-intl / addon / helpers / -base-legacy.js View on Github external
let out = new Stream(() => {
      let seenHash = readHash(hash);
      let seenValue = read(value);
      let format = {};

      if (seenValue && seenValue instanceof LiteralWrapper) {
        seenValue = seenValue.value;
      }

      if (optionalReturnEmpty && optionalReturnEmpty(seenValue, seenHash)) {
        return;
      }

      if (seenHash && seenHash.format) {
        format = intl.getFormat(formatType, seenHash.format);
      }

      return formatter.format.call(