code: function promisify(func) {
          return function(str, options) {
              var result,
                  deferred = q.defer(),
                  promise = deferred.promise;
  
              if (!_.isFunction(func)) {
                  deferred.reject();
              }
              else {
                  result = func(str, options);
  
                  if (_.isBoolean(result)) {
                      promise = handleBoolean(result, deferred);
                  }
                  else if (_.isFunction(result.then)) {
                      promise = result;
                  }
  
              }
              return promise;
          };
      }
docs: Promisify is a function that will take a sync function and wrap it in a promise, it will also resolve/reject
  the promise. If the function passed in returns a promise it will pass it along.
  
  @param func
  @returns {Function}