first commit

This commit is contained in:
2026-06-24 09:48:54 +02:00
commit 41e62ddcad
33739 changed files with 4266226 additions and 0 deletions
+34
View File
@@ -0,0 +1,34 @@
module.exports = {
equal: function (a, b) {
if (a === b) return true;
if (a == null && b == null) return true;
if (a == null || b == null) return false;
if (Object.keys(a).length != Object.keys(b).length) return false;
for(var key in a) {
// Only compare one level deep
if (a[key] !== b[key]) return false;
}
return true;
},
array: function (value) {
return Array.isArray(value);
},
number: function (value) {
if (typeof value === 'number') return true;
if (typeof value === 'object' && Object.prototype.toString.call(value) === '[object Number]') return true;
return false;
},
object: function (value) {
if (!value) return false;
return (typeof value === 'function' || typeof value === 'object');
},
string: function (value) {
if (typeof value === 'string') return true;
if (typeof value === 'object' && Object.prototype.toString.call(value) === '[object String]') return true;
return false;
}
};