You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
consul/ui/packages/consul-ui/app/helpers/last.js

13 lines
289 B

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