mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-10-22 11:17:39 +00:00
Minor tweaks to shadow warning infrastructure
1. Moved some methods out of boot.js because they are not needed until after bootup 2. Added alternate message for editing an overridden shadow tiddler 3. Minor style tweaks
This commit is contained in:
@@ -33,6 +33,23 @@ exports.count = function(object) {
|
||||
return s;
|
||||
};
|
||||
|
||||
/*
|
||||
Check if an array is equal by value and by reference.
|
||||
*/
|
||||
exports.isArrayEqual = function(array1,array2) {
|
||||
if(array1 === array2) {
|
||||
return true;
|
||||
}
|
||||
array1 = array1 || [];
|
||||
array2 = array2 || [];
|
||||
if(array1.length !== array2.length) {
|
||||
return false;
|
||||
}
|
||||
return array1.every(function(value,index) {
|
||||
return value === array2[index];
|
||||
});
|
||||
};
|
||||
|
||||
/*
|
||||
Push entries onto an array, removing them first if they already exist in the array
|
||||
array: array to modify (assumed to be free of duplicates)
|
||||
@@ -481,6 +498,6 @@ exports.timer = function(base) {
|
||||
m = m - base;
|
||||
}
|
||||
return m;
|
||||
}
|
||||
};
|
||||
|
||||
})();
|
||||
|
Reference in New Issue
Block a user