open-nomad/ui/app/helpers/invoke-fn.js
2023-04-10 15:36:59 +00:00

14 lines
266 B
JavaScript

/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/
import { helper } from '@ember/component/helper';
function invokeFn([scope, fn]) {
let args = arguments[0].slice(2);
return fn.apply(scope, args);
}
export default helper(invokeFn);