src/index.js
function presign (presignUrl, token, fn = presignRequest) {
  return new Promise((resolve, reject) => {
    fn(presignUrl, token)
      .then(responseStatus)
      .then(parseJSON)
      .then((res) => {
        resolve(res)
      })
      .catch((err) => {
        reject(err)
      })
  })
}
function presign (presignUrl, token, fn = presignRequest) {
  return new Promise((resolve, reject) => {
    fn(presignUrl, token)
      .then(responseStatus)
      .then(parseJSON)
      .then((res) => {
        resolve(res)
      })
      .catch((err) => {
        reject(err)
      })
  })
}
function presign ( presignUrl , token , fn = presignRequest ) { return new Promise ( ( resolve , reject ) => { fn ( presignUrl , token ) . then ( responseStatus ) . then ( parseJSON ) . then ( ( res ) => { resolve ( res ) } ) . catch ( ( err ) => { reject ( err ) } ) } ) }
presign
Take a url and optional token
return a Promise
@param  {String} presignUrl
@param  {String} token
@param  {Function} defaults to presignRequest()
@param  {Promise}
presign Take a url and optional token return a Promise