UNPKG

svcorelib

Version:

Core library used in the projects of Sv443 and the Sv443 Network. Contains tons of miscellaneous QoL features.

10 lines (7 loc) 300 B
function allEqual(array, loose) { if(!Array.isArray(array)) throw new Error(`Wrong argument provided for scl.allEqual() - (expected: "Object", got: "${typeof array}")`); return array.every(v => loose === true ? v == array[0] : v === array[0]); } module.exports = allEqual;