open-consul/ui-v2/app/helpers/substr.js
Kenia b0b76e6f0c ui: Create a helper to show the last 8 characters of token Accessor ID (#7327)
* Create substr helper
* Create a test for the new substr helper
* Display the last 8 characters of token Accessor ID in the Token lists page
2020-05-12 17:14:07 +00:00

6 lines
168 B
JavaScript

import { helper } from '@ember/component/helper';
export default helper(function substr([str = '', start = 0, length], hash) {
return str.substr(start, length);
});