UI for Zipcoin Blue

12345678910111213141516171819202122232425262728
  1. /*!
  2. * is-equal-shallow <https://github.com/jonschlinkert/is-equal-shallow>
  3. *
  4. * Copyright (c) 2015, Jon Schlinkert.
  5. * Licensed under the MIT License.
  6. */
  7. 'use strict';
  8. var isPrimitive = require('is-primitive');
  9. module.exports = function isEqual(a, b) {
  10. if (!a && !b) { return true; }
  11. if (!a && b || a && !b) { return false; }
  12. var numKeysA = 0, numKeysB = 0, key;
  13. for (key in b) {
  14. numKeysB++;
  15. if (!isPrimitive(b[key]) || !a.hasOwnProperty(key) || (a[key] !== b[key])) {
  16. return false;
  17. }
  18. }
  19. for (key in a) {
  20. numKeysA++;
  21. }
  22. return numKeysA === numKeysB;
  23. };