mirror of
https://github.com/marko-js/marko.git
synced 2025-12-08 19:26:05 +00:00
13 lines
258 B
JavaScript
13 lines
258 B
JavaScript
// TODO: deprecate this (and empty).
|
|
module.exports = function notEmpty(o) {
|
|
if (o == null) {
|
|
return false;
|
|
} else if (Array.isArray(o)) {
|
|
return !!o.length;
|
|
} else if (o === "") {
|
|
return false;
|
|
}
|
|
|
|
return true;
|
|
};
|