@mattseligman/lotide
Version:
Lotide is a mini clone of the Lodash Library to practice crating a personal npm package. It's like lodash, but without all that extra stuff. Just the things you need to start your project.
22 lines (15 loc) • 414 B
JavaScript
const flatten = require('./flatten');
const eqArrays = function(arrayOne, arrayTwo) {
const firstArray = flatten(arrayOne);
const secondArray = flatten(arrayTwo);
const sameLength = arrayOne.length === arrayTwo.length;
if (!sameLength) {
return false;
}
if (firstArray.join("") === secondArray.join("")) {
return true;
} else {
return false;
}
};
module.exports = eqArrays;