code: function async(f, args) {
      return new Promise(
        function(resolve, reject) {
          try {
            var r = f.apply(undefined, args);
            resolve(r);
          } catch(e) {
            reject(e);
          }
        }
      );
    }
docs: Creates a Promise.
  @param {Object} f Function.
  @param {Array} args List of arguments.
  @returns {Promise} Promise.