How to use the empty function from is
Find comprehensive JavaScript is.empty code examples handpicked from public code repositorys.
GitHub: Rekall/Rekall
164 165 166 167 168 169 170 171 172 173
is.defined = function (value) { return typeof value !== 'undefined'; }; /** * is.empty * Test if `value` is empty. * * @param {Mixed} value value to test * @return {Boolean} true if `value` is empty, false otherwise
7
24
8
GitHub: caolan/forms
85 86 87 88 89 90 91 92 93 94
empty: function (form) { return resolve({ empty: true, form: form }); } }; }); } if (typeof obj === 'undefined' || obj === null || (is.object(obj) && is.empty(obj))) { (callbacks.empty || callbacks.other)(f, callbacks); } else if (obj instanceof http.IncomingMessage) { if (obj.method === 'GET') { var qs = parse(obj.url, { parseArrays: false }).query;
170
0
29
+ 15 other calls in file
36 37 38 39 40 41 42 43 44 45
return; } const sess = config.get('sess'); if (is.undef(sess) || is.empty(sess)) { throw new Error('No valid session found. Please authorize first'); } api.sid = sess.sid;
1
7
3