mirror of https://github.com/rancher/ui.git
21 lines
335 B
JavaScript
21 lines
335 B
JavaScript
import { helper } from '@ember/component/helper';
|
|
|
|
export function defaultStr(params, options) {
|
|
var out = null;
|
|
var i = 0;
|
|
while ( !out && i < params.length)
|
|
{
|
|
out = params[i];
|
|
i++;
|
|
}
|
|
|
|
if ( !out && options && options.default)
|
|
{
|
|
out = options.default;
|
|
}
|
|
|
|
return out;
|
|
}
|
|
|
|
export default helper(defaultStr);
|