I have function like this:
export function getAllUser() {
  let user;
  UserModel
    .find()
    .exec()
    .then((data) => {
      return data;
    })
    .catch((err) => {
      return err;
    });
}
How can I return data from this function? For example, I want to defind:
user = getAllUser() 
 
     
    