1
0
mirror of https://github.com/nextcloud/ocsms.git synced 2026-08-26 07:30:13 +00:00

rename app.js to legacy.js, move globals to app.js in Sms object and helpers to a dedicated file

This commit is contained in:
Loic Blot
2017-12-28 17:39:14 +01:00
parent 4f01b5c467
commit 20b77148c7
5 changed files with 148 additions and 113 deletions
+29
View File
@@ -0,0 +1,29 @@
/**
* Nextcloud - Phone Sync
*
* This file is licensed under the Affero General Public License version 3 or
* later. See the COPYING file.
*
* @author Loic Blot <loic.blot@unix-experience.fr>
* @copyright Loic Blot 2014-2017
*/
function inArray(val, arr) {
return ($.inArray(val, arr) !== -1);
}
function arrayUnique(arr) {
return arr.filter(function (item, i, arr) {
return i === arr.indexOf(item);
});
}
function toBool(str) {
if (str === "true") {
return true;
}
else if (str === "false") {
return false;
}
return null;
}