kainjow/Mustache

Add a check for empty data

Snafuuz opened this issue · 3 comments

I have some cases in which it would be nice to know if a certain data object contains any attribute or not. This could easily be done by adding a new function to the data class:

bool is_empty_object() const {
return is_object() && obj_->empty();
}

Feel free to submit a pull request!