github.com/outbrain/consul@v1.4.5/ui-v2/app/helpers/last.js (about)

     1  import { helper } from '@ember/component/helper';
     2  
     3  export function last([obj = ''], hash) {
     4    // TODO: Another candidate for a reusable type checking
     5    // util for helpers
     6    switch (true) {
     7      case typeof obj === 'string':
     8        return obj.substr(-1);
     9    }
    10  }
    11  
    12  export default helper(last);