mirror of https://github.com/status-im/consul.git
9 lines
254 B
JavaScript
9 lines
254 B
JavaScript
|
import { helper } from '@ember/component/helper';
|
||
|
|
||
|
export function rightTrim([str = '', search = ''], hash) {
|
||
|
const pos = str.length - search.length;
|
||
|
return str.indexOf(search) === pos ? str.substr(0, pos) : str;
|
||
|
}
|
||
|
|
||
|
export default helper(rightTrim);
|