paperjs/paper.js — pull request #594 by megawac (2014-12-13 17:38:43+00:00)
Title: Refactor and optimize base equals

Do the `checkKeys` pass via `Object.keys` (if they have the same num of keys then the next pass will clearly catch all vallues), also reuse some of the array code with the obj check.

This is more or less a port of underscores is equal check for objs and arrays.

Note currently types aren't checked so `paper.Base.equals(new paper.Point, {y: 0, x:0})` which may or may not make sense.