open-consul/ui/packages/consul-ui/app/helpers/substr.js

11 lines
246 B
JavaScript
Raw Normal View History

/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/
import { helper } from '@ember/component/helper';
export default helper(function substr([str = '', start = 0, length], hash) {
return str.substr(start, length);
});