open-nomad/ui/app/helpers/is-object.js

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

15 lines
316 B
JavaScript
Raw Normal View History

/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/
import Helper from '@ember/component/helper';
2017-09-19 14:47:10 +00:00
export function isObject([value]) {
2021-12-28 16:08:12 +00:00
const isObject =
!Array.isArray(value) && value !== null && typeof value === 'object';
2017-09-19 14:47:10 +00:00
return isObject;
}
export default Helper.helper(isObject);