MCPcopy Create free account
hub / github.com/Code-Bullet/Jump-King / equals

Function equals

libraries/p5.js:2900–2918  ·  view source on GitHub ↗
(a, b)

Source from the content-addressed store, hash-verified

2898
2899// Custom equals function that can also check lists.
2900function equals(a, b) {
2901 if (a === b) {
2902 return true;
2903 } else if (Array.isArray(a) && Array.isArray(b)) {
2904 if (a.length !== b.length) {
2905 return false;
2906 }
2907
2908 for (var i = 0; i < a.length; i += 1) {
2909 if (!equals(a[i], b[i])) {
2910 return false;
2911 }
2912 }
2913
2914 return true;
2915 } else {
2916 return false;
2917 }
2918}
2919
2920// Parse a `CFF` INDEX array.
2921// An index array consists of a list of offsets, then a list of objects at those offsets.

Callers 1

makeDictFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected