From 51c9c416d42956d70b331b82c330d63e19d4ad1d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Lucas?= Date: Thu, 20 Jun 2013 11:11:01 +0200 Subject: [PATCH] Add a function to test if a variable is undefined. --- util.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/util.js b/util.js index 3b3d559..e68d12e 100644 --- a/util.js +++ b/util.js @@ -23,6 +23,11 @@ function strformat () { return s; } +function isDefined(x) { + var undefined; + return x !== undefined; +} + function getCurrentOption (option) { return $.cookie (option); }