I want to test if an object is empty, then empty it but only if true
With something like that :
angular.isDefined(this.project.motivation.description) = {}
The problem is that angular.isDefined
return a boolean.
Is that it has a method with good practice without used the conditions if, with Lodash or ES2015 for example ?