relay-runtime
Version:
A core runtime for building GraphQL-driven applications.
27 lines (22 loc) • 603 B
Flow
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @flow strict
* @format
* @oncall relay
*/
;
// $FlowFixMe[method-unbinding] added when improving typing for this parameters
const hasOwnProperty = Object.prototype.hasOwnProperty;
function isEmptyObject(obj: {+[key: string]: mixed}): boolean {
for (const key in obj) {
if (hasOwnProperty.call(obj, key)) {
return false;
}
}
return true;
}
module.exports = isEmptyObject;