@devexperts/utils
Version:
31 lines (30 loc) • 1.12 kB
TypeScript
/**
* Copyright (c) 2013-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
* @providesModule shallowEqual
* @typechecks
* @flow
*/
export declare const hasOwnProperty: (v: string | number | symbol) => boolean;
/**
* inlined Object.is polyfill to avoid requiring consumers ship their own
* https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
* @param {*} x
* @param {*} y
* @returns {boolean}
*/
export declare function is(x: any, y: any): boolean;
/**
* Performs equality by iterating through keys on an object and returning false
* when any key has values which are not strictly equal between the arguments.
* Returns true when the values of all keys are strictly equal.
* @param {*} objA
* @param {*} objB
* @returns {boolean}
*/
export declare function shallowEqual(objA: any, objB: any): boolean;