UNPKG

instantsearch.js

Version:

InstantSearch.js is a JavaScript library for building performant and instant search experiences with Algolia.

41 lines (31 loc) 808 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; function isPrimitive(obj) { return obj !== Object(obj); } function isEqual(first, second) { if (first === second) { return true; } if (isPrimitive(first) || isPrimitive(second) || typeof first === 'function' || typeof second === 'function') { return first === second; } if (Object.keys(first).length !== Object.keys(second).length) { return false; } for (var _i = 0, _Object$keys = Object.keys(first); _i < _Object$keys.length; _i++) { var key = _Object$keys[_i]; if (!(key in second)) { return false; } if (!isEqual(first[key], second[key])) { return false; } } return true; } var _default = isEqual; exports.default = _default;