mirror of
https://github.com/marko-js/marko.git
synced 2025-12-08 19:26:05 +00:00
Cleanup tests and add assertions that all deprecated tests log warnings, and all non deprecated tests don't.
14 lines
274 B
JavaScript
14 lines
274 B
JavaScript
module.exports = function notEmpty(o) {
|
|
require("complain")("notEmpty is deprecated.");
|
|
|
|
if (o == null) {
|
|
return false;
|
|
} else if (Array.isArray(o)) {
|
|
return !!o.length;
|
|
} else if (o === "") {
|
|
return false;
|
|
}
|
|
|
|
return true;
|
|
};
|