MCPcopy Create free account
hub / github.com/microsoft/SandDance / deepArrayEqual

Function deepArrayEqual

docs/tests/v2/es6/js/sanddance.js:5266–5285  ·  view source on GitHub ↗
(x, y)

Source from the content-addressed store, hash-verified

5264exports.GL_PARAMETER_GETTERS = GL_PARAMETER_GETTERS;
5265
5266var deepArrayEqual = function deepArrayEqual(x, y) {
5267 if (x === y) {
5268 return true;
5269 }
5270
5271 var isArrayX = Array.isArray(x) || ArrayBuffer.isView(x);
5272 var isArrayY = Array.isArray(y) || ArrayBuffer.isView(y);
5273
5274 if (isArrayX && isArrayY && x.length === y.length) {
5275 for (var i = 0; i < x.length; ++i) {
5276 if (x[i] !== y[i]) {
5277 return false;
5278 }
5279 }
5280
5281 return true;
5282 }
5283
5284 return false;
5285}; // PUBLIC METHODS
5286// Sets any single GL parameter regardless of function (gl.getParameter/gl.isEnabled...)
5287// Returns the previous value
5288// Note: limited to parameter values

Callers 1

getModifiedParametersFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected